summaryrefslogtreecommitdiffstats
path: root/ansible_collections/ibm/spectrum_virtualize
diff options
context:
space:
mode:
Diffstat (limited to 'ansible_collections/ibm/spectrum_virtualize')
-rw-r--r--ansible_collections/ibm/spectrum_virtualize/.github/workflows/main.yml14
-rw-r--r--ansible_collections/ibm/spectrum_virtualize/FILES.json487
-rw-r--r--ansible_collections/ibm/spectrum_virtualize/MANIFEST.json4
-rw-r--r--ansible_collections/ibm/spectrum_virtualize/README.md152
-rw-r--r--ansible_collections/ibm/spectrum_virtualize/changelogs/changelog.yaml6
-rw-r--r--ansible_collections/ibm/spectrum_virtualize/meta/runtime.yml6
-rw-r--r--ansible_collections/ibm/spectrum_virtualize/playbooks/multi_volume_create_host_mapping_zone_multipath/Readme.txt28
-rw-r--r--ansible_collections/ibm/spectrum_virtualize/playbooks/multi_volume_create_host_mapping_zone_multipath/multiple_vol_creation_zone_map.yml204
-rw-r--r--ansible_collections/ibm/spectrum_virtualize/playbooks/multi_volume_create_host_mapping_zone_multipath/multiple_vol_creation_zone_map_vars.txt30
-rw-r--r--ansible_collections/ibm/spectrum_virtualize/playbooks/volume_migration_on_svc_iscsi/Readme.txt45
-rw-r--r--ansible_collections/ibm/spectrum_virtualize/playbooks/volume_migration_on_svc_iscsi/create_iscsi_host_map_vol_switch.yml143
-rw-r--r--ansible_collections/ibm/spectrum_virtualize/playbooks/volume_migration_on_svc_iscsi/initiate_migration_for_given_volume.yml33
-rw-r--r--ansible_collections/ibm/spectrum_virtualize/playbooks/volume_migration_on_svc_iscsi/vol_migration_vars.txt36
-rw-r--r--ansible_collections/ibm/spectrum_virtualize/plugins/modules/ibm_svc_vdisk.py421
-rw-r--r--ansible_collections/ibm/spectrum_virtualize/tests/unit/plugins/modules/test_ibm_svc_vdisk.py473
15 files changed, 798 insertions, 1284 deletions
diff --git a/ansible_collections/ibm/spectrum_virtualize/.github/workflows/main.yml b/ansible_collections/ibm/spectrum_virtualize/.github/workflows/main.yml
index bad1d8dd8..49cfbcb9e 100644
--- a/ansible_collections/ibm/spectrum_virtualize/.github/workflows/main.yml
+++ b/ansible_collections/ibm/spectrum_virtualize/.github/workflows/main.yml
@@ -21,18 +21,11 @@ jobs:
- stable-2.13
- stable-2.14
python:
- - '2.7'
- '3.8'
- '3.9'
exclude:
- ansible: stable-2.9
python: '3.9'
- - ansible: stable-2.12
- python: '2.7'
- - ansible: stable-2.13
- python: '2.7'
- - ansible: stable-2.14
- python: '2.7'
- ansible: stable-2.14
python: '3.8'
steps:
@@ -73,18 +66,11 @@ jobs:
- stable-2.13
- stable-2.14
python:
- - '2.7'
- '3.8'
- '3.9'
exclude:
- ansible: stable-2.9
python: '3.9'
- - ansible: stable-2.12
- python: '2.7'
- - ansible: stable-2.13
- python: '2.7'
- - ansible: stable-2.14
- python: '2.7'
- ansible: stable-2.14
python: '3.8'
steps:
diff --git a/ansible_collections/ibm/spectrum_virtualize/FILES.json b/ansible_collections/ibm/spectrum_virtualize/FILES.json
index 0043a5e17..20b03c30d 100644
--- a/ansible_collections/ibm/spectrum_virtualize/FILES.json
+++ b/ansible_collections/ibm/spectrum_virtualize/FILES.json
@@ -25,7 +25,7 @@
"name": ".github/workflows/main.yml",
"ftype": "file",
"chksum_type": "sha256",
- "chksum_sha256": "ea85e89582ae7e5d03ea8f9ecfaf9236285efee981ce27db3241d161b7ba1152",
+ "chksum_sha256": "31af35810fde2bd8b1c68daf36a6d138ddad22fd0c1330ab8d9265a19849bf3f",
"format": 1
},
{
@@ -53,7 +53,7 @@
"name": "changelogs/changelog.yaml",
"ftype": "file",
"chksum_type": "sha256",
- "chksum_sha256": "9d298708b3e097a7f51a5125351efa0ae66d882f4db3e607c271b32ea68c0664",
+ "chksum_sha256": "27f9db0a097225f1fdb7e228f483cd1b743d90b8f869544276afa1e6472a42c6",
"format": 1
},
{
@@ -71,6 +71,13 @@
"format": 1
},
{
+ "name": "galaxy-importer.cfg",
+ "ftype": "file",
+ "chksum_type": "sha256",
+ "chksum_sha256": "7501d13dd591dda472fcdb8b9f44677a50ef86620f7756ba9c1196a41b2cd33c",
+ "format": 1
+ },
+ {
"name": "meta",
"ftype": "dir",
"chksum_type": null,
@@ -78,17 +85,17 @@
"format": 1
},
{
- "name": "meta/runtime.yml",
+ "name": "meta/execution-environment.yml",
"ftype": "file",
"chksum_type": "sha256",
- "chksum_sha256": "f5614008729520e63806d0dbb04f177ad75b25ba1aead1bb32585b45b1199d69",
+ "chksum_sha256": "82854d0088f5a33247495393b516cea47b8c522131c0af4b7be755d75107af3d",
"format": 1
},
{
- "name": "meta/execution-environment.yml",
+ "name": "meta/runtime.yml",
"ftype": "file",
"chksum_type": "sha256",
- "chksum_sha256": "82854d0088f5a33247495393b516cea47b8c522131c0af4b7be755d75107af3d",
+ "chksum_sha256": "c03f11d23823bc02cb96a7d367906c9dab8fa9aeba23be4ba0263018359130e5",
"format": 1
},
{
@@ -99,24 +106,24 @@
"format": 1
},
{
- "name": "playbooks/generic_ansible_sample.yaml",
+ "name": "playbooks/create_GMCV_in_CG.yml",
"ftype": "file",
"chksum_type": "sha256",
- "chksum_sha256": "4d804261c8c28d3a39afe649c255f983cdfd92b0b09eef320e046c10c60c7d84",
+ "chksum_sha256": "69b5d3f520619991ac8e75d5140bd6a5a46720e114e8f7afff2c41d5c90c11be",
"format": 1
},
{
- "name": "playbooks/generic_info.yml",
+ "name": "playbooks/generic_ansible_sample.yaml",
"ftype": "file",
"chksum_type": "sha256",
- "chksum_sha256": "0e6347a4ddc84cc8daf6d73f6c9a26cd10b1d9a12d6ef971a1e888a448303b27",
+ "chksum_sha256": "4d804261c8c28d3a39afe649c255f983cdfd92b0b09eef320e046c10c60c7d84",
"format": 1
},
{
- "name": "playbooks/create_GMCV_in_CG.yml",
+ "name": "playbooks/generic_info.yml",
"ftype": "file",
"chksum_type": "sha256",
- "chksum_sha256": "69b5d3f520619991ac8e75d5140bd6a5a46720e114e8f7afff2c41d5c90c11be",
+ "chksum_sha256": "0e6347a4ddc84cc8daf6d73f6c9a26cd10b1d9a12d6ef971a1e888a448303b27",
"format": 1
},
{
@@ -141,13 +148,6 @@
"format": 1
},
{
- "name": "playbooks/volumegrp_create.yml",
- "ftype": "file",
- "chksum_type": "sha256",
- "chksum_sha256": "d58341d383558e50798b3c140087079d254e10614e22d4165b600470565c4109",
- "format": 1
- },
- {
"name": "playbooks/volume_migration",
"ftype": "dir",
"chksum_type": null,
@@ -183,6 +183,76 @@
"format": 1
},
{
+ "name": "playbooks/volumegrp_create.yml",
+ "ftype": "file",
+ "chksum_type": "sha256",
+ "chksum_sha256": "d58341d383558e50798b3c140087079d254e10614e22d4165b600470565c4109",
+ "format": 1
+ },
+ {
+ "name": "playbooks/volume_migration_on_svc_iscsi",
+ "ftype": "dir",
+ "chksum_type": null,
+ "chksum_sha256": null,
+ "format": 1
+ },
+ {
+ "name": "playbooks/volume_migration_on_svc_iscsi/vol_migration_vars.txt",
+ "ftype": "file",
+ "chksum_type": "sha256",
+ "chksum_sha256": "ef716cf64ce518b2db70913c828ec89468325caff01a16b88e94968e26b0c6f5",
+ "format": 1
+ },
+ {
+ "name": "playbooks/volume_migration_on_svc_iscsi/Readme.txt",
+ "ftype": "file",
+ "chksum_type": "sha256",
+ "chksum_sha256": "35522161c5ed3fbe0b9b8e2f0957b9941149447e6dc9b5e47a5e0a782c53a304",
+ "format": 1
+ },
+ {
+ "name": "playbooks/volume_migration_on_svc_iscsi/create_iscsi_host_map_vol_switch.yml",
+ "ftype": "file",
+ "chksum_type": "sha256",
+ "chksum_sha256": "b658de901f77820a15bc5bc2251e0eb7a912b05db1ace32265211cb1c2e44fa5",
+ "format": 1
+ },
+ {
+ "name": "playbooks/volume_migration_on_svc_iscsi/initiate_migration_for_given_volume.yml",
+ "ftype": "file",
+ "chksum_type": "sha256",
+ "chksum_sha256": "12a1297efc0e9e416d7c55515103dc7e6d64df86009943f8a97deed1386ff0d9",
+ "format": 1
+ },
+ {
+ "name": "playbooks/multi_volume_create_host_mapping_zone_multipath",
+ "ftype": "dir",
+ "chksum_type": null,
+ "chksum_sha256": null,
+ "format": 1
+ },
+ {
+ "name": "playbooks/multi_volume_create_host_mapping_zone_multipath/multiple_vol_creation_zone_map_vars.txt",
+ "ftype": "file",
+ "chksum_type": "sha256",
+ "chksum_sha256": "6c638ad2658cbe7240e8017a455f6fa8c6b901d51559c50daee2f4a589456152",
+ "format": 1
+ },
+ {
+ "name": "playbooks/multi_volume_create_host_mapping_zone_multipath/Readme.txt",
+ "ftype": "file",
+ "chksum_type": "sha256",
+ "chksum_sha256": "0526ba82bf45065fab533764ed1e65e436abb87d9f23d67019495fa80578d9f2",
+ "format": 1
+ },
+ {
+ "name": "playbooks/multi_volume_create_host_mapping_zone_multipath/multiple_vol_creation_zone_map.yml",
+ "ftype": "file",
+ "chksum_type": "sha256",
+ "chksum_sha256": "7af6fed971862af9c6f91584d4022378727a6625cc41eab16e10e2fda462adef",
+ "format": 1
+ },
+ {
"name": "plugins",
"ftype": "dir",
"chksum_type": null,
@@ -232,185 +302,185 @@
"format": 1
},
{
- "name": "plugins/modules/ibm_svc_auth.py",
+ "name": "plugins/modules/ibm_sv_manage_awss3_cloudaccount.py",
"ftype": "file",
"chksum_type": "sha256",
- "chksum_sha256": "5b81f6b4db66443e632239ff4af910b95c92e571a40994874ba423113c805a9f",
+ "chksum_sha256": "eeb3aae88a6882808d30a34043b58cc31a0ca621049b4a45c4daa99b5ab57c87",
"format": 1
},
{
- "name": "plugins/modules/ibm_svc_complete_initial_setup.py",
+ "name": "plugins/modules/ibm_sv_manage_cloud_backups.py",
"ftype": "file",
"chksum_type": "sha256",
- "chksum_sha256": "1905de93c10ca651eedd79c81b442c0bf5fd33e9c484713e2cf6eb33d3d71785",
+ "chksum_sha256": "9149ea6f4eda997e53c5b978bd7ced8a90ada1c9961a43a171c53a95163a087f",
"format": 1
},
{
- "name": "plugins/modules/ibm_svc_manage_callhome.py",
+ "name": "plugins/modules/ibm_sv_manage_fc_partnership.py",
"ftype": "file",
"chksum_type": "sha256",
- "chksum_sha256": "2bfa05adc0609f15011fbe1c1b9c8c45852c783ee560a88049b55dd15299a186",
+ "chksum_sha256": "82d680d91a0a428da4490fa7908bca517b947a67054250412d0547a8eac1444f",
"format": 1
},
{
- "name": "plugins/modules/ibm_svc_manage_cv.py",
+ "name": "plugins/modules/ibm_sv_manage_fcportsetmember.py",
"ftype": "file",
"chksum_type": "sha256",
- "chksum_sha256": "a9eb49551a8d77107fb11a3ea60daed8cb4630cd0fe0dd4f8f9a1a66d03cbd7d",
+ "chksum_sha256": "f727d3e62d8b4e2b72480e0abf2c1209ab5225f95671218da34284b5f63e4e54",
"format": 1
},
{
- "name": "plugins/modules/ibm_svc_manage_flashcopy.py",
+ "name": "plugins/modules/ibm_sv_manage_ip_partnership.py",
"ftype": "file",
"chksum_type": "sha256",
- "chksum_sha256": "e716ba71c8b06026f19d5085bf46c1fdff89bda8e33c44048ff86ceee2f624a6",
+ "chksum_sha256": "cccfb97b0336b1f7c259032a85d08e65c1b78ac73ae6e2dc4bb8fd6b19c08b1d",
"format": 1
},
{
- "name": "plugins/modules/ibm_svc_manage_ip.py",
+ "name": "plugins/modules/ibm_sv_manage_provisioning_policy.py",
"ftype": "file",
"chksum_type": "sha256",
- "chksum_sha256": "9a1564d37a960f0864d8fa977d6871aa95096f0c7423d691c8fd3d8b93315fbe",
+ "chksum_sha256": "88b6c6027dc71e59e25c517a95bfcd8dc6514c9857e990f5b697c5a35525193c",
"format": 1
},
{
- "name": "plugins/modules/ibm_svc_manage_mirrored_volume.py",
+ "name": "plugins/modules/ibm_sv_manage_replication_policy.py",
"ftype": "file",
"chksum_type": "sha256",
- "chksum_sha256": "0d3dc16d5803c5227143c0aa96abcf5eb13bcd5309b51e25f312082e4c39dafe",
+ "chksum_sha256": "50989a73d4b4d0cc9e3f1777cc3ae09911033f6785babedfaa6439b98151720f",
"format": 1
},
{
- "name": "plugins/modules/ibm_svc_manage_replication.py",
+ "name": "plugins/modules/ibm_sv_manage_snapshot.py",
"ftype": "file",
"chksum_type": "sha256",
- "chksum_sha256": "feebabbc03efd86c82f55de6e1c976083764752cd55a8cc8944c02d2d5e6a7e6",
+ "chksum_sha256": "ec1dfb1390100778abf18a0c2488411ab29eee06f24b05b1f76d9fe5cf8a52dd",
"format": 1
},
{
- "name": "plugins/modules/ibm_svc_manage_replicationgroup.py",
+ "name": "plugins/modules/ibm_sv_manage_snapshotpolicy.py",
"ftype": "file",
"chksum_type": "sha256",
- "chksum_sha256": "264fbe5d6ad76ea098bdd694a291b3e842c3363cf1212030d694b99a54190720",
+ "chksum_sha256": "e61d04c1ca744f205f97a1d101a8fc13b9cc12f66f4cb2277f53bb77fa9d5505",
"format": 1
},
{
- "name": "plugins/modules/ibm_svc_manage_user.py",
+ "name": "plugins/modules/ibm_sv_manage_ssl_certificate.py",
"ftype": "file",
"chksum_type": "sha256",
- "chksum_sha256": "8a748c40e02a044ae36034f6789c7f62d44e8cc298d926e06de7ec5e6b566ab3",
+ "chksum_sha256": "8fcba087976d6c9cc98b12d77c3930d7306fb59b026776b77e8dae93ec3c2f81",
"format": 1
},
{
- "name": "plugins/modules/ibm_svc_manage_usergroup.py",
+ "name": "plugins/modules/ibm_sv_manage_truststore_for_replication.py",
"ftype": "file",
"chksum_type": "sha256",
- "chksum_sha256": "795c8b2d00d0306edc5593446201107356a3f69db938cd2862eb409c35c8605c",
+ "chksum_sha256": "d669db7064795663a2345e389bafe4edd3e260e753e012ce27b7d91d240168a2",
"format": 1
},
{
- "name": "plugins/modules/ibm_svc_mdisk.py",
+ "name": "plugins/modules/ibm_sv_restore_cloud_backup.py",
"ftype": "file",
"chksum_type": "sha256",
- "chksum_sha256": "3c2903182074095bad71c2992576e5227661668c4ed4422be004cfc1e6b29abb",
+ "chksum_sha256": "178341bf08b2da2f298e294965f689c741e371e0062f169f6a5d4fdebc62705d",
"format": 1
},
{
- "name": "plugins/modules/ibm_svc_start_stop_flashcopy.py",
+ "name": "plugins/modules/ibm_sv_switch_replication_direction.py",
"ftype": "file",
"chksum_type": "sha256",
- "chksum_sha256": "a8542e5ec1020a807e1aecd6ecb44f14e60bf4641dddb5224c025411f7e5f47e",
+ "chksum_sha256": "3ae68fff59de2452e73cacff827171a1a7550a9c71fc600f751e728df9c5cfbe",
"format": 1
},
{
- "name": "plugins/modules/ibm_svc_start_stop_replication.py",
+ "name": "plugins/modules/ibm_svc_auth.py",
"ftype": "file",
"chksum_type": "sha256",
- "chksum_sha256": "26a75e103b07d72e9b8f6a46cd25e10cee53cf4098f31413062d0da559e12cda",
+ "chksum_sha256": "5b81f6b4db66443e632239ff4af910b95c92e571a40994874ba423113c805a9f",
"format": 1
},
{
- "name": "plugins/modules/ibm_svc_vol_map.py",
+ "name": "plugins/modules/ibm_svc_complete_initial_setup.py",
"ftype": "file",
"chksum_type": "sha256",
- "chksum_sha256": "77a6cb11357cf1f244c961094ea9d2245d0a9f145b9dd944ade609f7b6a4832b",
+ "chksum_sha256": "1905de93c10ca651eedd79c81b442c0bf5fd33e9c484713e2cf6eb33d3d71785",
"format": 1
},
{
- "name": "plugins/modules/ibm_svctask_command.py",
+ "name": "plugins/modules/ibm_svc_host.py",
"ftype": "file",
"chksum_type": "sha256",
- "chksum_sha256": "b24e5881e0e417e3723ce4593fb1d8cc60b1be546c12c358f129f742d0418c2d",
+ "chksum_sha256": "307ff594d96b4d2f6cc842f631293b024239acc357c7fd5c9bcbb5981cb6fffc",
"format": 1
},
{
- "name": "plugins/modules/ibm_sv_manage_ip_partnership.py",
+ "name": "plugins/modules/ibm_svc_hostcluster.py",
"ftype": "file",
"chksum_type": "sha256",
- "chksum_sha256": "cccfb97b0336b1f7c259032a85d08e65c1b78ac73ae6e2dc4bb8fd6b19c08b1d",
+ "chksum_sha256": "94362873432e23d67da21c47507da5c1470596726776fde415506d8224f48664",
"format": 1
},
{
- "name": "plugins/modules/ibm_svc_vdisk.py",
+ "name": "plugins/modules/ibm_svc_info.py",
"ftype": "file",
"chksum_type": "sha256",
- "chksum_sha256": "8f55f1ef8fe1ff8b6b178ddb8cb1688b940bbb7108951f2b313f98e593a9ad59",
+ "chksum_sha256": "affb7038cd0857aa4cef63f64bb4ff3e676954dd6b6cea7a3f693f15072a5720",
"format": 1
},
{
- "name": "plugins/modules/ibm_sv_manage_provisioning_policy.py",
+ "name": "plugins/modules/ibm_svc_initial_setup.py",
"ftype": "file",
"chksum_type": "sha256",
- "chksum_sha256": "88b6c6027dc71e59e25c517a95bfcd8dc6514c9857e990f5b697c5a35525193c",
+ "chksum_sha256": "0326cc4bbcf4594c81ef5797878e5e7bcb500ee4084a423a1e23dcdce545fd39",
"format": 1
},
{
- "name": "plugins/modules/ibm_sv_manage_replication_policy.py",
+ "name": "plugins/modules/ibm_svc_manage_callhome.py",
"ftype": "file",
"chksum_type": "sha256",
- "chksum_sha256": "50989a73d4b4d0cc9e3f1777cc3ae09911033f6785babedfaa6439b98151720f",
+ "chksum_sha256": "2bfa05adc0609f15011fbe1c1b9c8c45852c783ee560a88049b55dd15299a186",
"format": 1
},
{
- "name": "plugins/modules/ibm_sv_manage_snapshot.py",
+ "name": "plugins/modules/ibm_svc_manage_consistgrp_flashcopy.py",
"ftype": "file",
"chksum_type": "sha256",
- "chksum_sha256": "ec1dfb1390100778abf18a0c2488411ab29eee06f24b05b1f76d9fe5cf8a52dd",
+ "chksum_sha256": "5ca9a6fdc914d98e8a309848d0bdd5757bdb074be8d8d6b2482fdc36d18cc9b1",
"format": 1
},
{
- "name": "plugins/modules/ibm_sv_manage_snapshotpolicy.py",
+ "name": "plugins/modules/ibm_svc_manage_cv.py",
"ftype": "file",
"chksum_type": "sha256",
- "chksum_sha256": "e61d04c1ca744f205f97a1d101a8fc13b9cc12f66f4cb2277f53bb77fa9d5505",
+ "chksum_sha256": "a9eb49551a8d77107fb11a3ea60daed8cb4630cd0fe0dd4f8f9a1a66d03cbd7d",
"format": 1
},
{
- "name": "plugins/modules/ibm_sv_switch_replication_direction.py",
+ "name": "plugins/modules/ibm_svc_manage_flashcopy.py",
"ftype": "file",
"chksum_type": "sha256",
- "chksum_sha256": "3ae68fff59de2452e73cacff827171a1a7550a9c71fc600f751e728df9c5cfbe",
+ "chksum_sha256": "e716ba71c8b06026f19d5085bf46c1fdff89bda8e33c44048ff86ceee2f624a6",
"format": 1
},
{
- "name": "plugins/modules/ibm_svc_hostcluster.py",
+ "name": "plugins/modules/ibm_svc_manage_ip.py",
"ftype": "file",
"chksum_type": "sha256",
- "chksum_sha256": "94362873432e23d67da21c47507da5c1470596726776fde415506d8224f48664",
+ "chksum_sha256": "9a1564d37a960f0864d8fa977d6871aa95096f0c7423d691c8fd3d8b93315fbe",
"format": 1
},
{
- "name": "plugins/modules/ibm_svc_initial_setup.py",
+ "name": "plugins/modules/ibm_svc_manage_migration.py",
"ftype": "file",
"chksum_type": "sha256",
- "chksum_sha256": "0326cc4bbcf4594c81ef5797878e5e7bcb500ee4084a423a1e23dcdce545fd39",
+ "chksum_sha256": "98e41799506a60feb3be0c1ff92cfc9a53390d889c406e2dc40a61885587a7f8",
"format": 1
},
{
- "name": "plugins/modules/ibm_svc_manage_consistgrp_flashcopy.py",
+ "name": "plugins/modules/ibm_svc_manage_mirrored_volume.py",
"ftype": "file",
"chksum_type": "sha256",
- "chksum_sha256": "5ca9a6fdc914d98e8a309848d0bdd5757bdb074be8d8d6b2482fdc36d18cc9b1",
+ "chksum_sha256": "0d3dc16d5803c5227143c0aa96abcf5eb13bcd5309b51e25f312082e4c39dafe",
"format": 1
},
{
@@ -421,45 +491,52 @@
"format": 1
},
{
- "name": "plugins/modules/ibm_svc_manage_safeguarded_policy.py",
+ "name": "plugins/modules/ibm_svc_manage_portset.py",
"ftype": "file",
"chksum_type": "sha256",
- "chksum_sha256": "75ce0c3ad4aa96d953dcda3c54e5b8bf11a6128608616b2e8d1529d48136f4ca",
+ "chksum_sha256": "eeb6408391d9c496c9700243c7daaae4debfd3bde56d54c412355ab13e08c51a",
"format": 1
},
{
- "name": "plugins/modules/ibm_svc_manage_sra.py",
+ "name": "plugins/modules/ibm_svc_manage_replication.py",
"ftype": "file",
"chksum_type": "sha256",
- "chksum_sha256": "e298e0a4f5e4e8c47113ff8692f4dcdeabe880264c129c3cb07fdc96c7095ac6",
+ "chksum_sha256": "feebabbc03efd86c82f55de6e1c976083764752cd55a8cc8944c02d2d5e6a7e6",
"format": 1
},
{
- "name": "plugins/modules/ibm_svc_manage_volumegroup.py",
+ "name": "plugins/modules/ibm_svc_manage_replicationgroup.py",
"ftype": "file",
"chksum_type": "sha256",
- "chksum_sha256": "6944f827a63ae67d6c856aadc8348d06b1bbd362e9c1ec7b95a97938eb8456bb",
+ "chksum_sha256": "264fbe5d6ad76ea098bdd694a291b3e842c3363cf1212030d694b99a54190720",
"format": 1
},
{
- "name": "plugins/modules/ibm_sv_manage_ssl_certificate.py",
+ "name": "plugins/modules/ibm_svc_manage_safeguarded_policy.py",
"ftype": "file",
"chksum_type": "sha256",
- "chksum_sha256": "8fcba087976d6c9cc98b12d77c3930d7306fb59b026776b77e8dae93ec3c2f81",
+ "chksum_sha256": "75ce0c3ad4aa96d953dcda3c54e5b8bf11a6128608616b2e8d1529d48136f4ca",
"format": 1
},
{
- "name": "plugins/modules/ibm_svcinfo_command.py",
+ "name": "plugins/modules/ibm_svc_manage_sra.py",
"ftype": "file",
"chksum_type": "sha256",
- "chksum_sha256": "5a85d5e474c57756f167672b77f26a4cde807c91cc7dbd343f0f7286d17fb410",
+ "chksum_sha256": "e298e0a4f5e4e8c47113ff8692f4dcdeabe880264c129c3cb07fdc96c7095ac6",
"format": 1
},
{
- "name": "plugins/modules/ibm_svc_manage_migration.py",
+ "name": "plugins/modules/ibm_svc_manage_user.py",
"ftype": "file",
"chksum_type": "sha256",
- "chksum_sha256": "98e41799506a60feb3be0c1ff92cfc9a53390d889c406e2dc40a61885587a7f8",
+ "chksum_sha256": "8a748c40e02a044ae36034f6789c7f62d44e8cc298d926e06de7ec5e6b566ab3",
+ "format": 1
+ },
+ {
+ "name": "plugins/modules/ibm_svc_manage_usergroup.py",
+ "ftype": "file",
+ "chksum_type": "sha256",
+ "chksum_sha256": "795c8b2d00d0306edc5593446201107356a3f69db938cd2862eb409c35c8605c",
"format": 1
},
{
@@ -470,73 +547,73 @@
"format": 1
},
{
- "name": "plugins/modules/ibm_sv_manage_awss3_cloudaccount.py",
+ "name": "plugins/modules/ibm_svc_manage_volumegroup.py",
"ftype": "file",
"chksum_type": "sha256",
- "chksum_sha256": "eeb3aae88a6882808d30a34043b58cc31a0ca621049b4a45c4daa99b5ab57c87",
+ "chksum_sha256": "6944f827a63ae67d6c856aadc8348d06b1bbd362e9c1ec7b95a97938eb8456bb",
"format": 1
},
{
- "name": "plugins/modules/ibm_sv_manage_cloud_backups.py",
+ "name": "plugins/modules/ibm_svc_mdisk.py",
"ftype": "file",
"chksum_type": "sha256",
- "chksum_sha256": "9149ea6f4eda997e53c5b978bd7ced8a90ada1c9961a43a171c53a95163a087f",
+ "chksum_sha256": "3c2903182074095bad71c2992576e5227661668c4ed4422be004cfc1e6b29abb",
"format": 1
},
{
- "name": "plugins/modules/ibm_sv_manage_fc_partnership.py",
+ "name": "plugins/modules/ibm_svc_mdiskgrp.py",
"ftype": "file",
"chksum_type": "sha256",
- "chksum_sha256": "82d680d91a0a428da4490fa7908bca517b947a67054250412d0547a8eac1444f",
+ "chksum_sha256": "a1d03397771fcdd95163b8fea340ba3d2d8e2b7fce588e53224c6f753899d0dd",
"format": 1
},
{
- "name": "plugins/modules/ibm_sv_manage_fcportsetmember.py",
+ "name": "plugins/modules/ibm_svc_start_stop_flashcopy.py",
"ftype": "file",
"chksum_type": "sha256",
- "chksum_sha256": "f727d3e62d8b4e2b72480e0abf2c1209ab5225f95671218da34284b5f63e4e54",
+ "chksum_sha256": "a8542e5ec1020a807e1aecd6ecb44f14e60bf4641dddb5224c025411f7e5f47e",
"format": 1
},
{
- "name": "plugins/modules/ibm_sv_manage_truststore_for_replication.py",
+ "name": "plugins/modules/ibm_svc_start_stop_replication.py",
"ftype": "file",
"chksum_type": "sha256",
- "chksum_sha256": "d669db7064795663a2345e389bafe4edd3e260e753e012ce27b7d91d240168a2",
+ "chksum_sha256": "26a75e103b07d72e9b8f6a46cd25e10cee53cf4098f31413062d0da559e12cda",
"format": 1
},
{
- "name": "plugins/modules/ibm_sv_restore_cloud_backup.py",
+ "name": "plugins/modules/ibm_svc_vol_map.py",
"ftype": "file",
"chksum_type": "sha256",
- "chksum_sha256": "178341bf08b2da2f298e294965f689c741e371e0062f169f6a5d4fdebc62705d",
+ "chksum_sha256": "77a6cb11357cf1f244c961094ea9d2245d0a9f145b9dd944ade609f7b6a4832b",
"format": 1
},
{
- "name": "plugins/modules/ibm_svc_host.py",
+ "name": "plugins/modules/ibm_svcinfo_command.py",
"ftype": "file",
"chksum_type": "sha256",
- "chksum_sha256": "307ff594d96b4d2f6cc842f631293b024239acc357c7fd5c9bcbb5981cb6fffc",
+ "chksum_sha256": "5a85d5e474c57756f167672b77f26a4cde807c91cc7dbd343f0f7286d17fb410",
"format": 1
},
{
- "name": "plugins/modules/ibm_svc_info.py",
+ "name": "plugins/modules/ibm_svctask_command.py",
"ftype": "file",
"chksum_type": "sha256",
- "chksum_sha256": "affb7038cd0857aa4cef63f64bb4ff3e676954dd6b6cea7a3f693f15072a5720",
+ "chksum_sha256": "b24e5881e0e417e3723ce4593fb1d8cc60b1be546c12c358f129f742d0418c2d",
"format": 1
},
{
- "name": "plugins/modules/ibm_svc_manage_portset.py",
+ "name": "requirements.txt",
"ftype": "file",
"chksum_type": "sha256",
- "chksum_sha256": "eeb6408391d9c496c9700243c7daaae4debfd3bde56d54c412355ab13e08c51a",
+ "chksum_sha256": "51b6a1455380a67307dd3b9d1ecfe69a26ce9cc5e6ab6fb2d29dc91c63f8fd8f",
"format": 1
},
{
- "name": "plugins/modules/ibm_svc_mdiskgrp.py",
+ "name": "requirements.yml",
"ftype": "file",
"chksum_type": "sha256",
- "chksum_sha256": "a1d03397771fcdd95163b8fea340ba3d2d8e2b7fce588e53224c6f753899d0dd",
+ "chksum_sha256": "134abe94ea511975eb2cc46a0150599afc81fb12e0a09ddbcf97d2ec39cb7357",
"format": 1
},
{
@@ -568,14 +645,14 @@
"format": 1
},
{
- "name": "tests/sanity/ignore-2.9.txt",
+ "name": "tests/sanity/ignore-2.13.txt",
"ftype": "file",
"chksum_type": "sha256",
"chksum_sha256": "daff51a57f16f15f70a99b4356bc389ca3543c680dddf58f2721b4f652698ee0",
"format": 1
},
{
- "name": "tests/sanity/ignore-2.13.txt",
+ "name": "tests/sanity/ignore-2.9.txt",
"ftype": "file",
"chksum_type": "sha256",
"chksum_sha256": "daff51a57f16f15f70a99b4356bc389ca3543c680dddf58f2721b4f652698ee0",
@@ -624,262 +701,241 @@
"format": 1
},
{
- "name": "tests/unit/plugins/modules/test_ibm_svc_auth.py",
- "ftype": "file",
- "chksum_type": "sha256",
- "chksum_sha256": "dcbe779c8945b5dd2ae56441c830dffe0d306c644d60955d2d95d88fc89074e2",
- "format": 1
- },
- {
- "name": "tests/unit/plugins/modules/test_ibm_svc_complete_initial_setup.py",
- "ftype": "file",
- "chksum_type": "sha256",
- "chksum_sha256": "187bae51452a2d69c08e229e9fe8d4742b7cdc79fcbedf0c9ded20a0e19849bb",
- "format": 1
- },
- {
- "name": "tests/unit/plugins/modules/test_ibm_svc_hostcluster.py",
- "ftype": "file",
- "chksum_type": "sha256",
- "chksum_sha256": "2b285af061c2e81f3baff642f56566da3b69fb9057f91c739a1c48270a6f9aee",
- "format": 1
- },
- {
- "name": "tests/unit/plugins/modules/test_ibm_svc_initial_setup.py",
+ "name": "tests/unit/plugins/modules/test_ibm_sv_manage_awss3_cloudaccount.py",
"ftype": "file",
"chksum_type": "sha256",
- "chksum_sha256": "a6d836087b171b39982b4e0abeb28afeadc0c19e0befa119fdd7dcc4ac471490",
+ "chksum_sha256": "fa0fbd1abb1da6a478d009c0281ec19bd91da0b8739a17890f7dfe10a84cb54e",
"format": 1
},
{
- "name": "tests/unit/plugins/modules/test_ibm_svc_manage_callhome.py",
+ "name": "tests/unit/plugins/modules/test_ibm_sv_manage_cloud_backups.py",
"ftype": "file",
"chksum_type": "sha256",
- "chksum_sha256": "2c863e5cf376bb135a1c3b066e7972f81915f505651a8a6aaddd239fd10d62c1",
+ "chksum_sha256": "48156ff487870ac46f4cb403957537ab300bafa121f5e61766075a649b2a2519",
"format": 1
},
{
- "name": "tests/unit/plugins/modules/test_ibm_svc_manage_consistgrp_flashcopy.py",
+ "name": "tests/unit/plugins/modules/test_ibm_sv_manage_fc_partnership.py",
"ftype": "file",
"chksum_type": "sha256",
- "chksum_sha256": "d69eab89afd086c37d637bed17d9cf181e8d8085510d0415497a1c7d4d45819e",
+ "chksum_sha256": "859bb227ab162b8fd00818d5a0cb9ae6a8b0b8d3a8765ad942c6ce3fcdaabe7f",
"format": 1
},
{
- "name": "tests/unit/plugins/modules/test_ibm_svc_manage_cv.py",
+ "name": "tests/unit/plugins/modules/test_ibm_sv_manage_fcportsetmember.py",
"ftype": "file",
"chksum_type": "sha256",
- "chksum_sha256": "1dbb60f628fffdb19cedd915fc19041f58ae4d56ce236c45e0de9ae09c8da511",
+ "chksum_sha256": "76de84375f4746ad416ea434236323857d5d48e512fef89a9cc2ce7033f5830f",
"format": 1
},
{
- "name": "tests/unit/plugins/modules/test_ibm_svc_manage_flashcopy.py",
+ "name": "tests/unit/plugins/modules/test_ibm_sv_manage_ip_partnership.py",
"ftype": "file",
"chksum_type": "sha256",
- "chksum_sha256": "cab4c0cb49a09fd9b06c3e38e54ad6caa32efe1461c571ace2756281e59edee4",
+ "chksum_sha256": "8bc51c38ab2c6a049d00112c45de31e3c1a19d02b85f0d32a7c578d94a158499",
"format": 1
},
{
- "name": "tests/unit/plugins/modules/test_ibm_svc_manage_ip.py",
+ "name": "tests/unit/plugins/modules/test_ibm_sv_manage_provisioning_policy.py",
"ftype": "file",
"chksum_type": "sha256",
- "chksum_sha256": "a3f7171af40820bf4b6f8aed69d3e09dd8ebac39e242bd5eaaac91489da51c91",
+ "chksum_sha256": "384f512fac49f366678509d111913aa98a7c16079e59ace7edd0f4b5cfcfd1ce",
"format": 1
},
{
- "name": "tests/unit/plugins/modules/test_ibm_svc_manage_mirrored_volume.py",
+ "name": "tests/unit/plugins/modules/test_ibm_sv_manage_replication_policy.py",
"ftype": "file",
"chksum_type": "sha256",
- "chksum_sha256": "8937fb4013f7ecbf6b3773b2e852fd87d3b4d68cc20c5753f0e37e936a4e5c0b",
+ "chksum_sha256": "02c91a06f4490861a9e58425802ab9a5c9c04a9f752541daf4ec47e8a47027ce",
"format": 1
},
{
- "name": "tests/unit/plugins/modules/test_ibm_svc_manage_ownershipgroup.py",
+ "name": "tests/unit/plugins/modules/test_ibm_sv_manage_snapshot.py",
"ftype": "file",
"chksum_type": "sha256",
- "chksum_sha256": "1616f8f6f0bcb35513e177f00c155554b30909f78464453370b215e5245b535c",
+ "chksum_sha256": "cb78fa2f32ca6802c7ecbd246d0b1ac681c28e7a88f76435d2e78fe3a36dd107",
"format": 1
},
{
- "name": "tests/unit/plugins/modules/test_ibm_svc_manage_replication.py",
+ "name": "tests/unit/plugins/modules/test_ibm_sv_manage_snapshot_policy.py",
"ftype": "file",
"chksum_type": "sha256",
- "chksum_sha256": "b0343cf2f92f4cca23471c46372bccac602db38eb41bec56890e0ccea4e940b7",
+ "chksum_sha256": "047cb1813da22efb4724c565ec07224a9e7c7768743ab324409e74004f1dd83f",
"format": 1
},
{
- "name": "tests/unit/plugins/modules/test_ibm_svc_manage_replicationgroup.py",
+ "name": "tests/unit/plugins/modules/test_ibm_sv_manage_ssl_certificate.py",
"ftype": "file",
"chksum_type": "sha256",
- "chksum_sha256": "972bbd8d1cfda500a1651d831a35d16d6fd6e8caddf4d80480371aa17528bf6b",
+ "chksum_sha256": "176158c315c90c4eac0dca056a4058b0bb6b4142d43602503ec213d35244099b",
"format": 1
},
{
- "name": "tests/unit/plugins/modules/test_ibm_svc_manage_safeguarded_policy.py",
+ "name": "tests/unit/plugins/modules/test_ibm_sv_manage_truststore_for_replication.py",
"ftype": "file",
"chksum_type": "sha256",
- "chksum_sha256": "6c84c0dc60dab3e2aed8c51e9140c4f45e5844608b06c563d9c93bbe3d3f0384",
+ "chksum_sha256": "e2957f3fbaaf1049361f4a2027d565adf7e9a15f73d1af139a81aed30a67a4fb",
"format": 1
},
{
- "name": "tests/unit/plugins/modules/test_ibm_svc_manage_sra.py",
+ "name": "tests/unit/plugins/modules/test_ibm_sv_restore_cloud_backup.py",
"ftype": "file",
"chksum_type": "sha256",
- "chksum_sha256": "78774c98fbcf2a543fb6d49b82dea61c6d4a8105d6d2a8bc949f6980840e9037",
+ "chksum_sha256": "8360e33c724235c589c057ec45b8b415a2e8762f32638c3bc4ec40f2c243d093",
"format": 1
},
{
- "name": "tests/unit/plugins/modules/test_ibm_svc_manage_user.py",
+ "name": "tests/unit/plugins/modules/test_ibm_sv_switch_replication_direction.py",
"ftype": "file",
"chksum_type": "sha256",
- "chksum_sha256": "bc0a63fa0a7498b8320927737988824a187052032dbba16eedba25092c9eb6f5",
+ "chksum_sha256": "cc1dcca78d7884cd2dee677782b62023668d12124bad9fda1d7a5f1f93a0aa15",
"format": 1
},
{
- "name": "tests/unit/plugins/modules/test_ibm_svc_manage_usergroup.py",
+ "name": "tests/unit/plugins/modules/test_ibm_svc_auth.py",
"ftype": "file",
"chksum_type": "sha256",
- "chksum_sha256": "afff9022506bf5c5a0f38b3a45cae4e326635e960808294532d4276b45e5042e",
+ "chksum_sha256": "dcbe779c8945b5dd2ae56441c830dffe0d306c644d60955d2d95d88fc89074e2",
"format": 1
},
{
- "name": "tests/unit/plugins/modules/test_ibm_svc_mdisk.py",
+ "name": "tests/unit/plugins/modules/test_ibm_svc_complete_initial_setup.py",
"ftype": "file",
"chksum_type": "sha256",
- "chksum_sha256": "51717d02bef44db970d6073ee870592a0282569893351d6946162e3f4e866a4e",
+ "chksum_sha256": "187bae51452a2d69c08e229e9fe8d4742b7cdc79fcbedf0c9ded20a0e19849bb",
"format": 1
},
{
- "name": "tests/unit/plugins/modules/test_ibm_svc_start_stop_flashcopy.py",
+ "name": "tests/unit/plugins/modules/test_ibm_svc_host.py",
"ftype": "file",
"chksum_type": "sha256",
- "chksum_sha256": "7c1d7d6b567ea9a7b59755464df59e951a2173b200cbd91a313986093780c2f5",
+ "chksum_sha256": "751253101a547d501ae439c9f926d936e3704f0013812bb2ee8b3456d1901a4a",
"format": 1
},
{
- "name": "tests/unit/plugins/modules/test_ibm_svc_start_stop_replication.py",
+ "name": "tests/unit/plugins/modules/test_ibm_svc_hostcluster.py",
"ftype": "file",
"chksum_type": "sha256",
- "chksum_sha256": "5e76618cdc63825c97bd3d3ff0b7631ff7516c93540094aa3137007a5a5462ec",
+ "chksum_sha256": "2b285af061c2e81f3baff642f56566da3b69fb9057f91c739a1c48270a6f9aee",
"format": 1
},
{
- "name": "tests/unit/plugins/modules/test_ibm_svc_vdisk.py",
+ "name": "tests/unit/plugins/modules/test_ibm_svc_info.py",
"ftype": "file",
"chksum_type": "sha256",
- "chksum_sha256": "69ca79500c2039bf8ff858aef6376d726183cd619fa304e90cf600b5c2b70255",
+ "chksum_sha256": "f58fd3073d1672883ce7faedf52920965ea615dbbca1e140c3025addc5e5745a",
"format": 1
},
{
- "name": "tests/unit/plugins/modules/test_ibm_svc_vol_map.py",
+ "name": "tests/unit/plugins/modules/test_ibm_svc_initial_setup.py",
"ftype": "file",
"chksum_type": "sha256",
- "chksum_sha256": "c27d92040a95ed23d9e5d860b880f7bcf343da767bf2932aafe83f33fb5b3287",
+ "chksum_sha256": "a6d836087b171b39982b4e0abeb28afeadc0c19e0befa119fdd7dcc4ac471490",
"format": 1
},
{
- "name": "tests/unit/plugins/modules/test_ibm_svcinfo_command.py",
+ "name": "tests/unit/plugins/modules/test_ibm_svc_manage_callhome.py",
"ftype": "file",
"chksum_type": "sha256",
- "chksum_sha256": "0f7d9be0c049635ad29ea2f7676dab82069fc8747dab75488f005887029d6634",
+ "chksum_sha256": "2c863e5cf376bb135a1c3b066e7972f81915f505651a8a6aaddd239fd10d62c1",
"format": 1
},
{
- "name": "tests/unit/plugins/modules/test_ibm_svctask_command.py",
+ "name": "tests/unit/plugins/modules/test_ibm_svc_manage_consistgrp_flashcopy.py",
"ftype": "file",
"chksum_type": "sha256",
- "chksum_sha256": "1f48e7a9815bb15cdfe937f946041055356318feff170014b3ad2f763484078f",
+ "chksum_sha256": "d69eab89afd086c37d637bed17d9cf181e8d8085510d0415497a1c7d4d45819e",
"format": 1
},
{
- "name": "tests/unit/plugins/modules/test_ibm_sv_manage_ip_partnership.py",
+ "name": "tests/unit/plugins/modules/test_ibm_svc_manage_cv.py",
"ftype": "file",
"chksum_type": "sha256",
- "chksum_sha256": "8bc51c38ab2c6a049d00112c45de31e3c1a19d02b85f0d32a7c578d94a158499",
+ "chksum_sha256": "1dbb60f628fffdb19cedd915fc19041f58ae4d56ce236c45e0de9ae09c8da511",
"format": 1
},
{
- "name": "tests/unit/plugins/modules/test_ibm_sv_manage_snapshot_policy.py",
+ "name": "tests/unit/plugins/modules/test_ibm_svc_manage_flashcopy.py",
"ftype": "file",
"chksum_type": "sha256",
- "chksum_sha256": "047cb1813da22efb4724c565ec07224a9e7c7768743ab324409e74004f1dd83f",
+ "chksum_sha256": "cab4c0cb49a09fd9b06c3e38e54ad6caa32efe1461c571ace2756281e59edee4",
"format": 1
},
{
- "name": "tests/unit/plugins/modules/test_ibm_sv_manage_provisioning_policy.py",
+ "name": "tests/unit/plugins/modules/test_ibm_svc_manage_ip.py",
"ftype": "file",
"chksum_type": "sha256",
- "chksum_sha256": "384f512fac49f366678509d111913aa98a7c16079e59ace7edd0f4b5cfcfd1ce",
+ "chksum_sha256": "a3f7171af40820bf4b6f8aed69d3e09dd8ebac39e242bd5eaaac91489da51c91",
"format": 1
},
{
- "name": "tests/unit/plugins/modules/test_ibm_sv_manage_replication_policy.py",
+ "name": "tests/unit/plugins/modules/test_ibm_svc_manage_migration.py",
"ftype": "file",
"chksum_type": "sha256",
- "chksum_sha256": "02c91a06f4490861a9e58425802ab9a5c9c04a9f752541daf4ec47e8a47027ce",
+ "chksum_sha256": "6f89529af5da44531b020271e058521d7252287ee713f76252ba03f98e415d34",
"format": 1
},
{
- "name": "tests/unit/plugins/modules/test_ibm_sv_manage_snapshot.py",
+ "name": "tests/unit/plugins/modules/test_ibm_svc_manage_mirrored_volume.py",
"ftype": "file",
"chksum_type": "sha256",
- "chksum_sha256": "cb78fa2f32ca6802c7ecbd246d0b1ac681c28e7a88f76435d2e78fe3a36dd107",
+ "chksum_sha256": "8937fb4013f7ecbf6b3773b2e852fd87d3b4d68cc20c5753f0e37e936a4e5c0b",
"format": 1
},
{
- "name": "tests/unit/plugins/modules/test_ibm_sv_manage_truststore_for_replication.py",
+ "name": "tests/unit/plugins/modules/test_ibm_svc_manage_ownershipgroup.py",
"ftype": "file",
"chksum_type": "sha256",
- "chksum_sha256": "e2957f3fbaaf1049361f4a2027d565adf7e9a15f73d1af139a81aed30a67a4fb",
+ "chksum_sha256": "1616f8f6f0bcb35513e177f00c155554b30909f78464453370b215e5245b535c",
"format": 1
},
{
- "name": "tests/unit/plugins/modules/test_ibm_sv_switch_replication_direction.py",
+ "name": "tests/unit/plugins/modules/test_ibm_svc_manage_portset.py",
"ftype": "file",
"chksum_type": "sha256",
- "chksum_sha256": "cc1dcca78d7884cd2dee677782b62023668d12124bad9fda1d7a5f1f93a0aa15",
+ "chksum_sha256": "a24941a59674fd82acf4de65aacd0c185488324276f6e4a915d3209ca5042ac7",
"format": 1
},
{
- "name": "tests/unit/plugins/modules/test_ibm_svc_manage_volumegroup.py",
+ "name": "tests/unit/plugins/modules/test_ibm_svc_manage_replication.py",
"ftype": "file",
"chksum_type": "sha256",
- "chksum_sha256": "530795c8b22273d3d95bf67b671182eb86b34a1fc2639b93261ba1ca30c7597c",
+ "chksum_sha256": "b0343cf2f92f4cca23471c46372bccac602db38eb41bec56890e0ccea4e940b7",
"format": 1
},
{
- "name": "tests/unit/plugins/modules/test_ibm_sv_manage_ssl_certificate.py",
+ "name": "tests/unit/plugins/modules/test_ibm_svc_manage_replicationgroup.py",
"ftype": "file",
"chksum_type": "sha256",
- "chksum_sha256": "176158c315c90c4eac0dca056a4058b0bb6b4142d43602503ec213d35244099b",
+ "chksum_sha256": "972bbd8d1cfda500a1651d831a35d16d6fd6e8caddf4d80480371aa17528bf6b",
"format": 1
},
{
- "name": "tests/unit/plugins/modules/test_ibm_sv_manage_awss3_cloudaccount.py",
+ "name": "tests/unit/plugins/modules/test_ibm_svc_manage_safeguarded_policy.py",
"ftype": "file",
"chksum_type": "sha256",
- "chksum_sha256": "fa0fbd1abb1da6a478d009c0281ec19bd91da0b8739a17890f7dfe10a84cb54e",
+ "chksum_sha256": "6c84c0dc60dab3e2aed8c51e9140c4f45e5844608b06c563d9c93bbe3d3f0384",
"format": 1
},
{
- "name": "tests/unit/plugins/modules/test_ibm_sv_manage_cloud_backups.py",
+ "name": "tests/unit/plugins/modules/test_ibm_svc_manage_sra.py",
"ftype": "file",
"chksum_type": "sha256",
- "chksum_sha256": "48156ff487870ac46f4cb403957537ab300bafa121f5e61766075a649b2a2519",
+ "chksum_sha256": "78774c98fbcf2a543fb6d49b82dea61c6d4a8105d6d2a8bc949f6980840e9037",
"format": 1
},
{
- "name": "tests/unit/plugins/modules/test_ibm_sv_restore_cloud_backup.py",
+ "name": "tests/unit/plugins/modules/test_ibm_svc_manage_user.py",
"ftype": "file",
"chksum_type": "sha256",
- "chksum_sha256": "8360e33c724235c589c057ec45b8b415a2e8762f32638c3bc4ec40f2c243d093",
+ "chksum_sha256": "bc0a63fa0a7498b8320927737988824a187052032dbba16eedba25092c9eb6f5",
"format": 1
},
{
- "name": "tests/unit/plugins/modules/test_ibm_svc_manage_migration.py",
+ "name": "tests/unit/plugins/modules/test_ibm_svc_manage_usergroup.py",
"ftype": "file",
"chksum_type": "sha256",
- "chksum_sha256": "6f89529af5da44531b020271e058521d7252287ee713f76252ba03f98e415d34",
+ "chksum_sha256": "afff9022506bf5c5a0f38b3a45cae4e326635e960808294532d4276b45e5042e",
"format": 1
},
{
@@ -890,73 +946,66 @@
"format": 1
},
{
- "name": "tests/unit/plugins/modules/test_ibm_sv_manage_fc_partnership.py",
- "ftype": "file",
- "chksum_type": "sha256",
- "chksum_sha256": "859bb227ab162b8fd00818d5a0cb9ae6a8b0b8d3a8765ad942c6ce3fcdaabe7f",
- "format": 1
- },
- {
- "name": "tests/unit/plugins/modules/test_ibm_sv_manage_fcportsetmember.py",
+ "name": "tests/unit/plugins/modules/test_ibm_svc_manage_volumegroup.py",
"ftype": "file",
"chksum_type": "sha256",
- "chksum_sha256": "76de84375f4746ad416ea434236323857d5d48e512fef89a9cc2ce7033f5830f",
+ "chksum_sha256": "530795c8b22273d3d95bf67b671182eb86b34a1fc2639b93261ba1ca30c7597c",
"format": 1
},
{
- "name": "tests/unit/plugins/modules/test_ibm_svc_host.py",
+ "name": "tests/unit/plugins/modules/test_ibm_svc_mdisk.py",
"ftype": "file",
"chksum_type": "sha256",
- "chksum_sha256": "751253101a547d501ae439c9f926d936e3704f0013812bb2ee8b3456d1901a4a",
+ "chksum_sha256": "51717d02bef44db970d6073ee870592a0282569893351d6946162e3f4e866a4e",
"format": 1
},
{
- "name": "tests/unit/plugins/modules/test_ibm_svc_info.py",
+ "name": "tests/unit/plugins/modules/test_ibm_svc_mdiskgrp.py",
"ftype": "file",
"chksum_type": "sha256",
- "chksum_sha256": "f58fd3073d1672883ce7faedf52920965ea615dbbca1e140c3025addc5e5745a",
+ "chksum_sha256": "6cc246158f36c1baf31e45ef18ca4baee81cfef022fb0b612775354342af211b",
"format": 1
},
{
- "name": "tests/unit/plugins/modules/test_ibm_svc_manage_portset.py",
+ "name": "tests/unit/plugins/modules/test_ibm_svc_start_stop_flashcopy.py",
"ftype": "file",
"chksum_type": "sha256",
- "chksum_sha256": "a24941a59674fd82acf4de65aacd0c185488324276f6e4a915d3209ca5042ac7",
+ "chksum_sha256": "7c1d7d6b567ea9a7b59755464df59e951a2173b200cbd91a313986093780c2f5",
"format": 1
},
{
- "name": "tests/unit/plugins/modules/test_ibm_svc_mdiskgrp.py",
+ "name": "tests/unit/plugins/modules/test_ibm_svc_start_stop_replication.py",
"ftype": "file",
"chksum_type": "sha256",
- "chksum_sha256": "6cc246158f36c1baf31e45ef18ca4baee81cfef022fb0b612775354342af211b",
+ "chksum_sha256": "5e76618cdc63825c97bd3d3ff0b7631ff7516c93540094aa3137007a5a5462ec",
"format": 1
},
{
- "name": "requirements.yml",
+ "name": "tests/unit/plugins/modules/test_ibm_svc_vol_map.py",
"ftype": "file",
"chksum_type": "sha256",
- "chksum_sha256": "134abe94ea511975eb2cc46a0150599afc81fb12e0a09ddbcf97d2ec39cb7357",
+ "chksum_sha256": "c27d92040a95ed23d9e5d860b880f7bcf343da767bf2932aafe83f33fb5b3287",
"format": 1
},
{
- "name": "README.md",
+ "name": "tests/unit/plugins/modules/test_ibm_svcinfo_command.py",
"ftype": "file",
"chksum_type": "sha256",
- "chksum_sha256": "60912537cde3dafb92d36179169be90d9400ee2c373bcaa9cf2eec6f57f6f688",
+ "chksum_sha256": "0f7d9be0c049635ad29ea2f7676dab82069fc8747dab75488f005887029d6634",
"format": 1
},
{
- "name": "galaxy-importer.cfg",
+ "name": "tests/unit/plugins/modules/test_ibm_svctask_command.py",
"ftype": "file",
"chksum_type": "sha256",
- "chksum_sha256": "7501d13dd591dda472fcdb8b9f44677a50ef86620f7756ba9c1196a41b2cd33c",
+ "chksum_sha256": "1f48e7a9815bb15cdfe937f946041055356318feff170014b3ad2f763484078f",
"format": 1
},
{
- "name": "requirements.txt",
+ "name": "README.md",
"ftype": "file",
"chksum_type": "sha256",
- "chksum_sha256": "51b6a1455380a67307dd3b9d1ecfe69a26ce9cc5e6ab6fb2d29dc91c63f8fd8f",
+ "chksum_sha256": "77fd2c36c9c826ab2169a44831f18cdff7c5f78e03c8f2695d6006ca9cad4753",
"format": 1
}
],
diff --git a/ansible_collections/ibm/spectrum_virtualize/MANIFEST.json b/ansible_collections/ibm/spectrum_virtualize/MANIFEST.json
index 3676a4f3f..e3d70d599 100644
--- a/ansible_collections/ibm/spectrum_virtualize/MANIFEST.json
+++ b/ansible_collections/ibm/spectrum_virtualize/MANIFEST.json
@@ -2,7 +2,7 @@
"collection_info": {
"namespace": "ibm",
"name": "spectrum_virtualize",
- "version": "1.12.0",
+ "version": "2.0.0",
"authors": [
"Shilpi Jain <shilpi.jain1@ibm.com>",
"Sanjaikumaar M <sanjaikumaar.m@ibm.com>",
@@ -27,7 +27,7 @@
"name": "FILES.json",
"ftype": "file",
"chksum_type": "sha256",
- "chksum_sha256": "30f8c616553f832f5918e3e029c278e6c812a175a62b3463df5838e0deef3da3",
+ "chksum_sha256": "f989583c1934a9683d7d0dc7bd1aecd6d8af94240e22e36c8c526aef4499c961",
"format": 1
},
"format": 1
diff --git a/ansible_collections/ibm/spectrum_virtualize/README.md b/ansible_collections/ibm/spectrum_virtualize/README.md
index 8755df085..d1f58b1b7 100644
--- a/ansible_collections/ibm/spectrum_virtualize/README.md
+++ b/ansible_collections/ibm/spectrum_virtualize/README.md
@@ -1,152 +1,6 @@
# Ansible Collection - ibm.spectrum_virtualize
-[![Code of conduct](https://img.shields.io/badge/code%20of%20conduct-Ansible-silver.svg)](https://docs.ansible.com/ansible/latest/community/code_of_conduct.html )
+Due to brand renaming of IBM spectrum virtualize to storage virtualize, this collection is being discontinued and archived.
-This collection provides a series of Ansible modules and plugins for interacting with the IBM Spectrum Virtualize family storage products. These products include the IBM SAN Volume Controller, IBM FlashSystem family members built with IBM Spectrum Virtualize (FlashSystem 5xxx, 7xxx, 9xxx), IBM Storwize family, and IBM Spectrum Virtualize for Public Cloud. For more information regarding these products, see [IBM Documentation](https://www.ibm.com/docs/).
-
-## Requirements
-
-- Ansible version 2.9 or higher
-
-## Installation
-
-To install the IBM Spectrum Virtualize collection hosted in Galaxy:
-
-```bash
-ansible-galaxy collection install ibm.spectrum_virtualize
-```
-
-To upgrade to the latest version of the IBM Spectrum Virtualize collection:
-
-```bash
-ansible-galaxy collection install ibm.spectrum_virtualize --force
-```
-
-## Usage
-
-### Playbooks
-
-To use a module from the IBM Spectrum Virtualize collection, please reference the full namespace, collection name, and module name that you want to use:
-
-```yaml
----
-- name: Using the IBM Spectrum Virtualize collection
- hosts: localhost
- tasks:
- - name: Gather info from storage
- ibm.spectrum_virtualize.ibm_svc_info:
- clustername: x.x.x.x
- domain:
- username: username
- password: password
- log_path: /tmp/playbook.debug
- gather_subset: all
-```
-
-Alternatively, you can add a full namepsace and collection name in the `collections` element:
-
-```yaml
----
-- name: Using the IBM Spectrum Virtualize collection
- collections:
- - ibm.spectrum_virtualize
- gather_facts: no
- connection: local
- hosts: localhost
- tasks:
- - name: Gather info from storage
- ibm_svc_info:
- clustername: x.x.x.x
- domain:
- username: username
- password: password
- log_path: /tmp/playbook.debug
- gather_subset: all
-```
-
-## Supported Resources
-
-### Modules
-
-- ibm_svc_auth - Generates an authentication token for a user on Spectrum Virtualize storage systems
-- ibm_svc_complete_initial_setup - Completes the initial setup configuration for LMC systems
-- ibm_svc_host - Manages hosts on Spectrum Virtualize storage systems
-- ibm_svc_hostcluster - Manages host cluster on Spectrum Virtualize storage systems
-- ibm_svc_info - Collects information on Spectrum Virtualize storage systems
-- ibm_svc_initial_setup - Manages initial setup configuration on Spectrum Virtualize storage systems
-- ibm_svc_manage_callhome - Manages configuration of Call Home feature on Spectrum Virtualize storage systems
-- ibm_svc_manage_consistgrp_flashcopy - Manages FlashCopy consistency groups on Spectrum Virtualize storage systems
-- ibm_svc_manage_cv - Manages the change volume in remote copy replication on Spectrum Virtualize storage systems
-- ibm_svc_manage_flashcopy - Manages FlashCopy mappings on Spectrum Virtualize storage systems
-- ibm_svc_manage_ip - Manages IP provisioning on Spectrum Virtualize storage systems
-- ibm_svc_manage_migration - Manages volume migration between clusters on Spectrum Virtualize storage systems
-- ibm_svc_manage_mirrored_volume - Manages mirrored volumes on Spectrum Virtualize storage systems
-- ibm_svc_manage_ownershipgroup - Manages ownership groups on Spectrum Virtualize storage systems
-- ibm_svc_manage_portset - Manages IP portset on Spectrum Virtualize storage systems
-- ibm_svc_manage_replication - Manages remote copy replication on Spectrum Virtualize storage systems
-- ibm_svc_manage_replicationgroup - Manages remote copy consistency groups on Spectrum Virtualize storage systems
-- ibm_svc_manage_safeguarded_policy - Manages safeguarded policy configuration on Spectrum Virtualize storage systems
-- ibm_svc_manage_sra - Manages the remote support assistance configuration on Spectrum Virtualize storage systems
-- ibm_svc_manage_user - Manages user on Spectrum Virtualize storage systems
-- ibm_svc_manage_usergroup - Manages user groups on Spectrum Virtualize storage systems
-- ibm_svc_manage_volume - Manages standard volumes on Spectrum Virtualize storage systems
-- ibm_svc_manage_volumegroup - Manages volume groups on Spectrum Virtualize storage systems
-- ibm_svc_mdisk - Manages MDisks for Spectrum Virtualize storage systems
-- ibm_svc_mdiskgrp - Manages pools for Spectrum Virtualize storage systems
-- ibm_svc_start_stop_flashcopy - Starts or stops FlashCopy mapping and consistency groups on Spectrum Virtualize storage systems
-- ibm_svc_start_stop_replication - Starts or stops remote-copy independent relationships or consistency groups on Spectrum Virtualize storage systems
-- ibm_svc_vol_map - Manages volume mapping for Spectrum Virtualize storage systems
-- ibm_svcinfo_command - Runs svcinfo CLI command on Spectrum Virtualize storage systems over SSH session
-- ibm_svctask_command - Runs svctask CLI command(s) on Spectrum Virtualize storage systems over SSH session
-- ibm_sv_manage_awss3_cloudaccount - Manages Amazon S3 cloud account configuration on Spectrum Virtualize storage systems
-- ibm_sv_manage_cloud_backup - Manages cloud backups on Spectrum Virtualize storage systems
-- ibm_sv_manage_fc_partnership - Manages Fibre Channel (FC) partnership on Spectrum Virtualize storage systems
-- ibm_sv_manage_fcportsetmember - Manages addition or removal of ports from the Fibre Channel (FC) portsets on Spectrum Virtualize storage systems
-- ibm_sv_manage_ip_partnership - Manages IP partnership configuration on Spectrum Virtualize storage systems
-- ibm_sv_manage_provisioning_policy - Manages provisioning policy configuration on Spectrum Virtualize storage systems
-- ibm_sv_manage_replication_policy - Manages policy-based replication configuration on Spectrum Virtualize storage systems
-- ibm_sv_manage_snapshot - Manages snapshots (mutual consistent images of a volume) on Spectrum Virtualize storage systems
-- ibm_sv_manage_snapshotpolicy - Manages snapshot policy configuration on Spectrum Virtualize storage systems
-- ibm_sv_manage_ssl_certificate - Exports an existing system certificate on to Spectrum Virtualize storage systems
-- ibm_sv_manage_truststore_for_replication - Manages certificate trust stores for replication on Spectrum Virtualize family storage systems
-- ibm_sv_restore_cloud_backup - Restores cloud backups on Spectrum Virtualize storage systems
-- ibm_sv_switch_replication_direction - Switches the replication direction on Spectrum Virtualize storage systems
-
-### Other Feature Information
-- SV Ansible Collection v1.8.0 provides the new 'ibm_svc_complete_initial_setup' module, to complete the automation of Day 0 configuration on Licensed Machine Code (LMC) systems.
- For non-LMC systems, login to the user-interface is required in order to complete the automation of Day 0 configuration.
-- SV Ansible Collection v1.7.0 provided `Setup and Configuration Automation` through different modules. This feature helps user to automate Day 0 configuration.
- This feature includes three modules:
- - ibm_svc_initial_setup
- - ibm_svc_manage_callhome
- - ibm_svc_manage_sra
-- By proceeding and using these modules, the user acknowledges that [IBM Privacy Statement](https://www.ibm.com/privacy) has been read and understood.
-
-### Prerequisite
-
-- Paramiko must be installed to use ibm_svctask_command and ibm_svcinfo_command modules.
-
-## Limitation
-
-The modules in the IBM Spectrum Virtualize Ansible collection leverage REST APIs to connect to the IBM Spectrum Virtualize storage system. This has following limitations:
-1. Using the REST APIs to list more than 2000 objects may create a loss of service from the API side, as it automatically restarts due to memory constraints.
-2. It is not possible to access REST APIs using an IPv6 address on a cluster.
-3. The Ansible collection can run on all IBM Spectrum Virtualize storage system versions above 8.1.3, except versions 8.3.1.3, 8.3.1.4 and 8.3.1.5.
-4. At time of release of the SV Ansible v1.8.0 collection, no module is available for non LMC systems to automate license agreements acceptance, including EULA.
- User will be presented with a GUI setup wizard upon user-interface login, whether the Ansible modules have been used for initial configuration or not.
-
-## Releasing, Versioning, and Deprecation
-
-1. IBM Spectrum Virtualize Ansible Collection releases follow a quarterly release cycle.
-2. IBM Spectrum Virtualize Ansible Collection releases follow [semantic versioning](https://semver.org/).
-3. IBM Spectrum Virtualize Ansible modules deprecation cycle is aligned with [Ansible](https://docs.ansible.com/ansible/latest/dev_guide/module_lifecycle.html).
-
-## Contributing
-
-Currently we are not accepting community contributions.
-Though, you may periodically review this content to learn when and how contributions can be made in the future.
-IBM Spectrum Virtualize Ansible Collection maintainers can follow the [Maintainer guidelines](https://docs.ansible.com/ansible/devel/community/maintainers.html).
-
-## License
-
-GNU General Public License v3.0
+It is being replaced with new repository. The new collection is fully compatible with the old one. All the new features and development will be done on the new collection.
+[ansible-collections/ibm.storage_virtualize](https://github.com/ansible-collections/ibm.storage_virtualize)
diff --git a/ansible_collections/ibm/spectrum_virtualize/changelogs/changelog.yaml b/ansible_collections/ibm/spectrum_virtualize/changelogs/changelog.yaml
index d7344d539..83cdcae33 100644
--- a/ansible_collections/ibm/spectrum_virtualize/changelogs/changelog.yaml
+++ b/ansible_collections/ibm/spectrum_virtualize/changelogs/changelog.yaml
@@ -136,3 +136,9 @@ releases:
- description: Manages addition or removal of ports from the Fibre Channel (FC) portsets on Spectrum Virtualize storage systems
name: ibm_sv_manage_fcportsetmember
namespace: ''
+ 2.0.0:
+ release_date: '2023-06-30'
+ changes:
+ release_summary: The collection is now archived and replaced with a new repository due to rebranding of spectrum virtualize to
+ storage virtualize.
+ minor_changes: The module ibm_svc_vdisk is also removed from the collection after being marked deprecated for last 4 cycles
diff --git a/ansible_collections/ibm/spectrum_virtualize/meta/runtime.yml b/ansible_collections/ibm/spectrum_virtualize/meta/runtime.yml
index 385b4e4bf..576832bc7 100644
--- a/ansible_collections/ibm/spectrum_virtualize/meta/runtime.yml
+++ b/ansible_collections/ibm/spectrum_virtualize/meta/runtime.yml
@@ -1,8 +1,2 @@
---
requires_ansible: '>=2.9.0'
-plugin_routing:
- modules:
- ibm_svc_vdisk:
- deprecation:
- removal_version: 2.0.0
- warning_text: Use ibm_svc_manage_volume instead. \ No newline at end of file
diff --git a/ansible_collections/ibm/spectrum_virtualize/playbooks/multi_volume_create_host_mapping_zone_multipath/Readme.txt b/ansible_collections/ibm/spectrum_virtualize/playbooks/multi_volume_create_host_mapping_zone_multipath/Readme.txt
new file mode 100644
index 000000000..e6bc84319
--- /dev/null
+++ b/ansible_collections/ibm/spectrum_virtualize/playbooks/multi_volume_create_host_mapping_zone_multipath/Readme.txt
@@ -0,0 +1,28 @@
+Objective:
+This playbook creates FC host, multiple volumes, zones on Flashsystem Cluster and performs mapping of all volumes to host.
+
+Prerequisite:
+- IBM Spectrum Virtualize and Brocade ansible collection plugins must be installed
+- For more information on Brocade switch ansible collection, please refer to https://github.com/brocade/ansible/blob/master/README.rst
+
+These playbooks maps multiple volumes of cluster to fc host
+- It uses spectrum virtualize ansible modules as well as brocade ansible modules to create zone
+
+There are total 2 files used for this use-case
+
+1. multiple_vol_creation_zone_map_vars
+ This file has all the variables required for playbooks
+ - cluster_* : Parameters starting with cluster contain cluster details where user wants to create volume, hosst etc
+ - brocade_switch_* : Parameters starting with brocade_switch contain brocade switch details
+ - application_host_*: Parameters starting with application_host contain application host details which is performing read/write of data
+ - volume_details : Parameters starting with volume contain volume details which will be mapped to host
+ - portset_* : Parameters starting with portset contain portset details required for creating fc host
+
+2. multi_volume_create_host_mapping_zone_multipath
+ - This playbook fetches the list of SCSI_HOST WWPN's associated with given fcioportid from specV cluster
+ - Creates zone with the name given and add specV ports fetched and host WWPN's given
+ - Creates multiple volumes based on volume details provided
+ - Maps the multiple volumes to Host to form multiple paths
+
+Authors: Ajinkya Nanavati (ananava1@in.ibm.com)
+ Mohit Chitlange (mochitla@in.ibm.com)
diff --git a/ansible_collections/ibm/spectrum_virtualize/playbooks/multi_volume_create_host_mapping_zone_multipath/multiple_vol_creation_zone_map.yml b/ansible_collections/ibm/spectrum_virtualize/playbooks/multi_volume_create_host_mapping_zone_multipath/multiple_vol_creation_zone_map.yml
new file mode 100644
index 000000000..597e668ee
--- /dev/null
+++ b/ansible_collections/ibm/spectrum_virtualize/playbooks/multi_volume_create_host_mapping_zone_multipath/multiple_vol_creation_zone_map.yml
@@ -0,0 +1,204 @@
+- name: Using Spectrum Virtualize collection to migrate given volumes
+ hosts: localhost
+ vars_files:
+ - multiple_vol_creation_zone_map_vars
+ collections:
+ - ibm.spectrum_virtualize
+ - brocade.fos
+ vars:
+ brocade_credentials:
+ fos_ip_addr: "{{ brocade_switch_ip }}"
+ fos_user_name: "{{ brocade_switch_username }}"
+ fos_password: "{{ brocade_switch_password }}"
+ https: False
+ gather_facts: no
+ connection: local
+ tasks:
+
+ - name: Fetch authorization token for source
+ register: specv_token
+ ibm_svc_auth:
+ clustername: "{{ cluster_ip }}"
+ username: "{{ cluster_username }}"
+ password: "{{ cluster_password }}"
+
+ - name: Get deatils of the targetportfc
+ register: fcdetails
+ ibm.spectrum_virtualize.ibm_svc_info:
+ clustername: "{{ cluster_ip }}"
+ token: "{{ specv_token.token }}"
+ gather_subset: [targetportfc]
+ log_path: /tmp/fcdetails.debug
+
+ - name: get the WWPN list from lstargetportfc for given fc_port_id
+ set_fact:
+ specv_wwpn: "{{ specv_wwpn|default([]) + [item['WWPN']]}}"
+ when: (item.protocol == 'scsi' and item.host_io_permitted == 'yes' and item.fc_io_port_id in cluster_fcioportid)
+ loop: "{{ fcdetails.TargetPortFC }}"
+
+ - name: modify specv wwpn the way switch want
+ set_fact:
+ specv_wwpn_switch_format: "{{ specv_wwpn_switch_format|default([]) +[item|map('join')|join(':')] }}"
+ loop: "{{ (specv_wwpn)|map('batch', 2)|map('list')|list|lower }}"
+
+ - name: get all zoning information from switch
+ brocade_facts:
+ credential: "{{brocade_credentials}}"
+ vfid: -1
+ gather_subset:
+ - brocade_zoning
+
+ - name: copy the active config in var active_switch_config
+ set_fact:
+ active_switch_config: "{{ ansible_facts.brocade_zoning['effective-configuration'].cfg_name }}"
+
+ - name: Create zones on Brocade switch
+ vars:
+ zone:
+ - name: "{{ application_host_zone_name }}"
+ members: "{{ application_host_wwpns + specv_wwpn_switch_format }}"
+ brocade.fos.brocade_zoning_zone:
+ credential: "{{ brocade_credentials }}"
+ vfid: -1
+ zones: "{{ zone }}"
+ members_add_only: True
+
+ - name: Add zone to active configuration
+ vars:
+ cfgs:
+ - name: "{{ active_switch_config }}"
+ members:
+ - "{{ application_host_zone_name }}"
+ brocade_zoning_cfg:
+ credential: "{{ brocade_credentials }}"
+ vfid: -1
+ members_add_only: True
+ cfgs: "{{ cfgs }}"
+ active_cfg: "{{ active_switch_config }}"
+
+ - name: create host list for specv without colon format
+ set_fact:
+ application_host_wwpns_specvformat_list: "{{ application_host_wwpns_specvformat_list | default([]) + [(item | replace(':',''))|upper]}}"
+ loop: "{{application_host_wwpns }}"
+
+ - name: create host list for specv without colon format
+ set_fact:
+ application_host_wwpns_specvformat: "{{application_host_wwpns_specvformat |default('')+item +':'}}"
+ loop: "{{application_host_wwpns_specvformat_list| select() }}"
+
+ - set_fact:
+ application_host_wwpns_specvformat: "{{ application_host_wwpns_specvformat[:-1]}}"
+
+ - name: Creating Host on specv
+ ibm_svc_host:
+ clustername: "{{ cluster_ip }}"
+ token: "{{ specv_token.token }}"
+ name: "{{ host_name }}"
+ state: present
+ fcwwpn: "{{ application_host_wwpns_specvformat }}"
+
+ - name: Create a fc porset
+ ibm.spectrum_virtualize.ibm_svc_manage_portset:
+ clustername: "{{ cluster_ip }}"
+ token: "{{ specv_token.token }}"
+ name: "{{ portset_name }}"
+ porttype: fc
+ portset_type: host
+ state: present
+
+ - name: Add port ID to the portset
+ ibm.spectrum_virtualize.ibm_sv_manage_fcportsetmember:
+ clustername: "{{ cluster_ip }}"
+ token: "{{ specv_token.token }}"
+ name: "{{ portset_name }}"
+ fcportid: "{{item}}"
+ state: present
+ loop: "{{ cluster_fcioportid }}"
+
+ - name: Create vdisk
+ register: results_cvdisk
+ ibm_svc_vdisk:
+ clustername: "{{cluster_ip}}"
+ token: "{{ specv_token.token }}"
+ domain:
+ state: present
+ name: "{{item.vol_name}}"
+ mdiskgrp: "{{item.mdiskgrp}}"
+ easytier: 'off'
+ size: "{{item.size}}"
+ unit: "{{item.unit}}"
+ loop: "{{ volume_details }}"
+
+ - name: map Host to Vdisk
+ ibm_svc_vol_map:
+ clustername: "{{cluster_ip}}"
+ token: "{{ specv_token.token }}"
+ domain:
+ state: present
+ volname: "{{item.vol_name}}"
+ host: "{{host_name}}"
+ loop: "{{ volume_details }}"
+
+ - name: Rescan the paths on the host and run multipath
+ shell: "ssh {{application_host_username}}@{{application_host_ip}} rescan-scsi-bus.sh -i --forcerescan;sleep 40;"
+
+ - shell: "ssh {{application_host_username}}@{{application_host_ip}} multipath -ll"
+ register: ps
+
+ - name: Separate facts
+ set_fact:
+ multipath_var: "{{ ps.stdout.split('mpath') }}"
+
+ - debug:
+ msg: "{{ multipath_var}}"
+
+ - name: Get deatils of the given volume
+ register: volinfo
+ ibm.spectrum_virtualize.ibm_svc_info:
+ clustername: "{{ cluster_ip }}"
+ token: "{{ specv_token.token }}"
+ gather_subset: [vol]
+ log_path: /tmp/volinfo.debug
+
+ - name: create volume list
+ set_fact:
+ vol_name_list: "{{ vol_name_list|default([])+ [item['vol_name']] }}"
+ loop: "{{ volume_details }}"
+
+ - debug:
+ msg: "{{ vol_name_list }}"
+
+ - name: find vollist data
+ set_fact:
+ vol_list_full_data: "{{ vol_list_full_data|default([])+ [item] }}"
+ vol_name_uid: "{{ vol_name_uid|default([])+[[item['volume_name'],item['vdisk_UID']|lower]]}}"
+ when: (item.volume_name in vol_name_list )
+ loop: "{{ volinfo.Volume }}"
+
+ - debug:
+ msg: "{{ vol_name_uid }}"
+
+ - name: Find vdisk UID present in host with path
+ set_fact:
+ dm_device: "{{dm_device| default([]) +[ [item.0] + [item.1] + [item.2]]}}"
+ when: (item.1 in item.2)
+ with_nested:
+ - "{{ vol_name_uid }}"
+ - "{{ multipath_var }}"
+
+ - name: find unmapped volume
+ set_fact:
+ vdisk_mapped_multipath: "{{vdisk_mapped_multipath| default([]) + [item[0]]}}"
+ loop: "{{ dm_device }}"
+
+ - debug:
+ msg: "{{ vdisk_mapped_multipath }}"
+
+ - name: find unmapped volume
+ set_fact:
+ unmaped_vol_name_list: "{{ unmaped_vol_name_list|default([])+ [item] }}"
+ when: (item not in vdisk_mapped_multipath)
+ loop: "{{ vol_name_list }}"
+
+ - debug:
+ msg: "{{ unmaped_vol_name_list }}"
diff --git a/ansible_collections/ibm/spectrum_virtualize/playbooks/multi_volume_create_host_mapping_zone_multipath/multiple_vol_creation_zone_map_vars.txt b/ansible_collections/ibm/spectrum_virtualize/playbooks/multi_volume_create_host_mapping_zone_multipath/multiple_vol_creation_zone_map_vars.txt
new file mode 100644
index 000000000..8a4fcdb18
--- /dev/null
+++ b/ansible_collections/ibm/spectrum_virtualize/playbooks/multi_volume_create_host_mapping_zone_multipath/multiple_vol_creation_zone_map_vars.txt
@@ -0,0 +1,30 @@
+application_host_details:
+application_host_name: linux_host
+application_host_ip: a.b.c.d
+application_host_username: username
+application_host_password: password
+application_host_zone_name: test
+application_host_wwpns: ["10:00:00:90:fa:94:20:d0","10:00:00:90:fa:94:20:d2"]
+
+cluster_ip: x.x.x.x
+cluster_username: username1
+cluster_password: password1
+cluster_fcioportid: ['1']
+
+host_name: linux_ansible
+portset_name: portset_ansible
+portset_type: host
+port_type: fc
+brocade_switch_ip: z.z.z.z
+brocade_switch_username: username2
+brocade_switch_password: password2
+
+volume_details:
+ - vol_name: vdisk_3
+ mdiskgrp: "0"
+ size: "5"
+ unit: "gb"
+ - vol_name: vdisk_4
+ mdiskgrp: "0"
+ size: "5"
+ unit: "gb"
diff --git a/ansible_collections/ibm/spectrum_virtualize/playbooks/volume_migration_on_svc_iscsi/Readme.txt b/ansible_collections/ibm/spectrum_virtualize/playbooks/volume_migration_on_svc_iscsi/Readme.txt
new file mode 100644
index 000000000..8b2970259
--- /dev/null
+++ b/ansible_collections/ibm/spectrum_virtualize/playbooks/volume_migration_on_svc_iscsi/Readme.txt
@@ -0,0 +1,45 @@
+Objective:
+Migrate volume from one Flash System to another Flash System in application transparent manner with target host as ISCSI.
+
+Prerequisite:
+- IBM Spectrum Virtualize ansible collection plugins must be installed
+
+These playbooks migrate a volume from a source cluster to the destination cluster.
+These playbooks are designed to migrate volume mapped to Fibre Channel (FC) host or ISCSI host from source cluster to ISCSI host on destination cluster.
+
+There are total 3 files used for this use-case.
+ 1. vol_migration_vars:
+ This file has all the variables required for playbooks
+ - src_cluster_* : Parameters starting with src_cluster contain source cluster details from where user wants to migrate volume
+ - src_cluster_* : Parameters starting with src_cluster contain source cluster details from where user wants to migrate volume
+ - dest_cluster* : Parameters starting with dest_cluster contain destination cluster details to where volume will be migrated
+ - application_host_* : Parameters starting with application_host contain application host details which is performing read/write of data
+ - application_iscsi_ip : This contains in detail information for ip to be given to node with detail information as follows
+ - node_name: Node name of cluster
+ - portset: portset name to be used
+ - ip_address: <ip address>
+ - subnet_prefix: <prefix>
+ - gateway: <gateway>
+ - port: <port_id>
+ - src_vol_name : This suggest volume name of source cluster which is to be migrated
+ - dest_vol_name : This create volume name at destination cluster
+ - rel_name : This is name of relationship to be created between source and destination cluster
+ 2. initiate_migration_for_given_volume:
+ - This playbook initiates the migration
+ - Most importantly, it also starts data copy from source cluster to destination cluster
+ Note:
+ User should not run playbook create_zone_map_volume_and_rescan until relationship is in consistent_syncronized state
+ 3. create_host_map_volume_and_rescan
+ - Execute this playbook once the relationship created by above playbook is in consistent_syncronized state
+ - create iscsi host on flashsystem from iqn defined in variable application_host_iqn from variable file
+ - configuring ip on each node for iscsi host connectivity
+ - establish iscsi session from host to flashsystem nodes
+ - Maps the volume to the Host and starts scsi rescan on the host
+ - Switch replication direction of a migration relationship once host is mapped
+ - Again rescan the volume on the host to get the updated path details
+ - Delete source volume and migration relationship which was created
+ - Again rescan the multipath and expect migrated volume has the only path from destiantion cluster
+
+ Authors: Ajinkya Nanavati (ananava1@in.ibm.com)
+ Mohit Chitlange (mochitla@in.ibm.com)
+ Devendra Mahajan (demahaj1@in.ibm.com)
diff --git a/ansible_collections/ibm/spectrum_virtualize/playbooks/volume_migration_on_svc_iscsi/create_iscsi_host_map_vol_switch.yml b/ansible_collections/ibm/spectrum_virtualize/playbooks/volume_migration_on_svc_iscsi/create_iscsi_host_map_vol_switch.yml
new file mode 100644
index 000000000..b7a0f1bb3
--- /dev/null
+++ b/ansible_collections/ibm/spectrum_virtualize/playbooks/volume_migration_on_svc_iscsi/create_iscsi_host_map_vol_switch.yml
@@ -0,0 +1,143 @@
+- name: Using Spectrum Virtualize collection to migrate given volume
+ hosts: localhost
+ vars_files:
+ - vol_migration_vars
+ collections:
+ - ibm.spectrum_virtualize
+
+ gather_facts: no
+ vars:
+ dest_vol_name: "{{ dest_vol_name if dest_vol_name is defined else src_vol_name }}"
+ dest_host_name: "{{ host_name }}"
+ connection: local
+ tasks:
+ - name: Fetch authorization token for source
+ register: src_token
+ ibm_svc_auth:
+ clustername: "{{ src_cluster_ip }}"
+ username: "{{ src_cluster_username }}"
+ password: "{{ src_cluster_password }}"
+
+ - name: Fetch authorization token for destination
+ register: dest_token
+ ibm_svc_auth:
+ clustername: "{{ dest_cluster_ip }}"
+ username: "{{ dest_cluster_username }}"
+ password: "{{ dest_cluster_password }}"
+
+ - name: Get deatils of the given volume
+ register: volinfo
+ ibm.spectrum_virtualize.ibm_svc_info:
+ clustername: "{{ dest_cluster_ip }}"
+ token: "{{ dest_token.token }}"
+ gather_subset: [vol]
+ objectname: "{{ dest_vol_name }}"
+ log_path: /tmp/volinfo.debug
+
+ - name: Get the volume UID data
+ set_fact:
+ vol_uid: "{{ volinfo.Volume[0]['vdisk_UID'] | lower }}"
+ when: volinfo.Volume[0] is defined
+
+ - name: Creating Host on SVC
+ ibm_svc_host:
+ clustername: "{{ dest_cluster_ip }}"
+ token: "{{ dest_token.token }}"
+ name: "{{ dest_host_name }}"
+ state: present
+ iscsiname: "{{ application_host_iqn }}"
+
+ - name: map Vdisk to host
+ ibm_svc_vol_map:
+ clustername: "{{ dest_cluster_ip }}"
+ token: "{{ dest_token.token }}"
+ state: present
+ volname: "{{ dest_vol_name }}"
+ host: "{{ dest_host_name }}"
+ scsi: 0
+
+ - name: Create IP provisioning
+ ibm.spectrum_virtualize.ibm_svc_manage_ip:
+ clustername: "{{ dest_cluster_ip }}"
+ token: "{{ dest_token.token }}"
+ log_path: /tmp/playbook.debug
+ node: "{{ item.node_name }}"
+ port: "{{ item.port }}"
+ portset: "{{ item.portset }}"
+ ip_address: "{{ item.ip_address }}"
+ subnet_prefix: "{{ item.subnet_prefix }}"
+ gateway: "{{ item.gateway }}"
+ state: present
+ loop: "{{ application_iscsi_ip }}"
+
+ - name: Create iscsi session
+ shell: ssh {{ application_host_username }}@{{ application_host_ip }} "iscsiadm --mode discovery --type sendtargets --portal {{item.ip_address}} -l"
+ loop: "{{ application_iscsi_ip }}"
+
+ - shell: ssh {{ application_host_username }}@{{ application_host_ip }} "multipath -ll"
+ register: ps
+
+ - name: Separate facts
+ set_fact:
+ multipath_var: "{{ ps.stdout.split('mpath') }}"
+
+ - debug:
+ msg: "{{ multipath_var}}"
+
+ - name: Find vdisk UID present in host with path
+ set_fact:
+ dm_device: "{{item}}"
+ loop: "{{ multipath_var }}"
+ when: vol_uid in item
+
+ - debug:
+ msg: "{{ dm_device}}"
+
+ - name: Switch replication direction of a migration relationship
+ ibm_svc_manage_migration:
+ relationship_name: "{{ rel_name if rel_name is defined else src_vol_name }}"
+ clustername: "{{ src_cluster_ip }}"
+ token: "{{ src_token.token }}"
+ state: switch
+
+ - shell: ssh {{ application_host_username }}@{{ application_host_ip }} "rescan-scsi-bus.sh -i --forcerescan; sleep 40;"
+ - shell: ssh {{ application_host_username }}@{{ application_host_ip }} "multipath -ll"
+ register: ps
+
+ - name: Separate facts
+ set_fact:
+ multipath_var: "{{ ps.stdout.split('mpath') }}"
+
+ - name: Find vdisk UID present in host with path
+ set_fact:
+ dm_device: "{{item}}"
+ loop: "{{ multipath_var }}"
+ when: vol_uid in item
+
+ - debug:
+ msg: "{{ dm_device }}"
+
+ - name: Delete source volume and migration relationship
+ ibm_svc_manage_migration:
+ clustername: "{{ src_cluster_ip }}"
+ state: cleanup
+ source_volume: "{{ src_vol_name }}"
+ token: "{{ src_token.token }}"
+ log_path: /tmp/ansible.log
+
+ - shell: ssh {{ application_host_username }}@{{ application_host_ip }} "rescan-scsi-bus.sh -i --forcerescan; sleep 40;"
+ - shell: ssh {{ application_host_username }}@{{ application_host_ip }} "multipath -ll"
+ register: ps
+
+ - name: Separate facts
+ set_fact:
+ multipath_var: "{{ ps.stdout.split('mpath') }}"
+
+ - name: Find vdisk UID present in host with path
+ set_fact:
+ dm_device: "{{item}}"
+ loop: "{{ multipath_var }}"
+ when: vol_uid in item
+
+ - debug:
+ msg: "{{ dm_device}}"
diff --git a/ansible_collections/ibm/spectrum_virtualize/playbooks/volume_migration_on_svc_iscsi/initiate_migration_for_given_volume.yml b/ansible_collections/ibm/spectrum_virtualize/playbooks/volume_migration_on_svc_iscsi/initiate_migration_for_given_volume.yml
new file mode 100644
index 000000000..b01e6122b
--- /dev/null
+++ b/ansible_collections/ibm/spectrum_virtualize/playbooks/volume_migration_on_svc_iscsi/initiate_migration_for_given_volume.yml
@@ -0,0 +1,33 @@
+- name: Using Spectrum Virtualize collection to initiate migration
+ hosts: localhost
+ vars_files:
+ - vol_migration_vars
+ collections:
+ - ibm.spectrum_virtualize
+ gather_facts: no
+ connection: local
+ tasks:
+ - name: Fetch authorization token for source
+ register: src_token
+ ibm_svc_auth:
+ clustername: "{{ src_cluster_ip }}"
+ username: "{{ src_cluster_username }}"
+ password: "{{ src_cluster_password }}"
+ - name: Fetch authorization token for destination
+ register: dest_token
+ ibm_svc_auth:
+ clustername: "{{ dest_cluster_ip }}"
+ username: "{{ dest_cluster_username }}"
+ password: "{{ dest_cluster_password }}"
+ - name: Initiate a volume migration with replicate_hosts as false
+ ibm_svc_manage_migration:
+ source_volume: "{{ src_vol_name }}"
+ target_volume: "{{ dest_vol_name if dest_vol_name is defined else src_vol_name }}"
+ clustername: "{{ src_cluster_ip }}"
+ remote_cluster: "{{ dest_cluster_name }}"
+ token: "{{ src_token.token }}"
+ state: initiate
+ replicate_hosts: false
+ remote_token: "{{ dest_token.token }}"
+ relationship_name: "{{ rel_name if rel_name is defined else src_vol_name }}"
+ remote_pool: "{{ dest_cluster_pool_name }}"
diff --git a/ansible_collections/ibm/spectrum_virtualize/playbooks/volume_migration_on_svc_iscsi/vol_migration_vars.txt b/ansible_collections/ibm/spectrum_virtualize/playbooks/volume_migration_on_svc_iscsi/vol_migration_vars.txt
new file mode 100644
index 000000000..14905b86b
--- /dev/null
+++ b/ansible_collections/ibm/spectrum_virtualize/playbooks/volume_migration_on_svc_iscsi/vol_migration_vars.txt
@@ -0,0 +1,36 @@
+src_cluster_name: Master
+src_cluster_ip: x.x.x.x
+src_cluster_username: username
+src_cluster_password: password
+
+dest_cluster_name: Aux_far
+dest_cluster_ip: y.y.y.y
+dest_cluster_username: username1
+dest_cluster_password: password1
+dest_cluster_pool_name: mdiskgrp0
+
+application_host_details:
+application_host_name: linux_host
+application_host_ip: a.b.c.d
+application_host_username: username2
+application_host_password: password2
+application_host_iqn: "iqn.1994-05.com.redhat:5e54d1815f55"
+
+application_iscsi_ip:
+ - node_name: node1
+ portset: portset0
+ ip_address: 192.168.100.121
+ subnet_prefix: 24
+ gateway: 192.168.100.1
+ port: 6
+ - node_name: node2
+ portset: portset0
+ ip_address: 192.168.100.122
+ subnet_prefix: 24
+ gateway: 192.168.100.1
+ port: 6
+
+src_vol_name: vdisk_application1
+host_name: linux_host
+dest_vol_name: vdisk_application1
+rel_name: r1
diff --git a/ansible_collections/ibm/spectrum_virtualize/plugins/modules/ibm_svc_vdisk.py b/ansible_collections/ibm/spectrum_virtualize/plugins/modules/ibm_svc_vdisk.py
deleted file mode 100644
index 45c3d8a38..000000000
--- a/ansible_collections/ibm/spectrum_virtualize/plugins/modules/ibm_svc_vdisk.py
+++ /dev/null
@@ -1,421 +0,0 @@
-#!/usr/bin/python
-# -*- coding: utf-8 -*-
-
-# Copyright (C) 2020 IBM CORPORATION
-# Author(s): Peng Wang <wangpww@cn.ibm.com>
-# Sreshtant Bohidar <sreshtant.bohidar@ibm.com>
-# Rohit kumar <rohit.kumar6@ibm.com>
-# GNU General Public License v3.0+ (see COPYING or https://www.gnu.org/licenses/gpl-3.0.txt)
-
-from __future__ import absolute_import, division, print_function
-__metaclass__ = type
-
-DOCUMENTATION = '''
----
-module: ibm_svc_vdisk
-short_description: This module manages volumes on IBM Spectrum Virtualize
- Family storage systems
-description:
- - Ansible interface to manage 'mkvdisk' and 'rmvdisk' volume commands.
-version_added: "1.0.0"
-options:
- name:
- description:
- - Specifies the name to assign to the new volume.
- required: true
- type: str
- state:
- description:
- - Creates (C(present)) or removes (C(absent)) a volume.
- choices: [ absent, present ]
- required: true
- type: str
- clustername:
- description:
- - The hostname or management IP of the Spectrum Virtualize storage system.
- type: str
- required: true
- domain:
- description:
- - Domain for the Spectrum Virtualize storage system.
- - Valid when hostname is used for the parameter I(clustername).
- type: str
- username:
- description:
- - REST API username for the Spectrum Virtualize storage system.
- - The parameters I(username) and I(password) are required if not using I(token) to authenticate a user.
- type: str
- password:
- description:
- - REST API password for the Spectrum Virtualize storage system.
- - The parameters I(username) and I(password) are required if not using I(token) to authenticate a user.
- type: str
- token:
- description:
- - The authentication token to verify a user on the Spectrum Virtualize storage system.
- - To generate a token, use ibm_svc_auth module.
- type: str
- version_added: '1.5.0'
- mdiskgrp:
- description:
- - Specifies the name of the storage pool to use when
- creating this volume. This parameter is required when I(state=present).
- type: str
- easytier:
- description:
- - Defines use of easytier with VDisk.
- - Applies when I(state=present).
- type: str
- choices: [ 'on', 'off' ]
- size:
- description:
- - Defines the size of VDisk. This parameter is required when I(state=present).
- - This parameter can also be used to resize an existing VDisk.
- type: str
- unit:
- description:
- - Defines the size option for the storage unit. This parameter is required when I(state=present).
- type: str
- choices: [ b, kb, mb, gb, tb, pb ]
- default: mb
- validate_certs:
- description:
- - Validates certification.
- default: false
- type: bool
- log_path:
- description:
- - Path of debug log file.
- type: str
- rsize:
- description:
- - Defines how much physical space is initially allocated to the thin-provisioned volume in %.
- If rsize is not passed, the volume created is a standard volume.
- - Applies when C(state=present).
- type: str
- version_added: '1.2.0'
- autoexpand:
- description:
- - Specifies that thin-provisioned volume copies can automatically expand their real capacities.
- type: bool
- version_added: '1.2.0'
-author:
- - Sreshtant Bohidar(@Sreshtant-Bohidar)
- - Rohit Kumar(@rohitk-github)
-notes:
- - This module supports C(check_mode).
-deprecated:
- removed_in: 2.0.0
- why: New module released
- alternative: Use M(ibm.spectrum_virtualize.ibm_svc_manage_volume) instead.
-'''
-
-EXAMPLES = '''
-- name: Create a volume
- ibm.spectrum_virtualize.ibm_svc_vdisk:
- clustername: "{{clustername}}"
- domain: "{{domain}}"
- username: "{{username}}"
- password: "{{password}}"
- log_path: /tmp/playbook.debug
- name: volume0
- state: present
- mdiskgrp: Pool0
- easytier: 'off'
- size: "4294967296"
- unit: b
-- name: Create a thin-provisioned volume
- ibm.spectrum_virtualize.ibm_svc_vdisk:
- clustername: "{{clustername}}"
- domain: "{{domain}}"
- username: "{{username}}"
- password: "{{password}}"
- log_path: /tmp/playbook.debug
- name: volume0
- state: present
- mdiskgrp: Pool0
- easytier: 'off'
- size: "4294967296"
- unit: b
- rsize: '20%'
- autoexpand: true
-- name: Delete a volume
- ibm.spectrum_virtualize.ibm_svc_vdisk:
- clustername: "{{clustername}}"
- domain: "{{domain}}"
- username: "{{username}}"
- password: "{{password}}"
- log_path: /tmp/playbook.debug
- name: volume0
- state: absent
-'''
-
-RETURN = '''#'''
-
-from traceback import format_exc
-from ansible.module_utils.basic import AnsibleModule
-from ansible_collections.ibm.spectrum_virtualize.plugins.module_utils.ibm_svc_utils import IBMSVCRestApi, svc_argument_spec, get_logger
-from ansible.module_utils._text import to_native
-
-
-class IBMSVCvdisk(object):
- def __init__(self):
- argument_spec = svc_argument_spec()
-
- argument_spec.update(
- dict(
- name=dict(type='str', required=True),
- state=dict(type='str', required=True, choices=['absent',
- 'present']),
- mdiskgrp=dict(type='str', required=False),
- size=dict(type='str', required=False),
- unit=dict(type='str', default='mb', choices=['b', 'kb',
- 'mb', 'gb',
- 'tb', 'pb']),
- easytier=dict(type='str', choices=['on', 'off']),
- rsize=dict(type='str', required=False),
- autoexpand=dict(type='bool', required=False)
- )
- )
-
- self.module = AnsibleModule(argument_spec=argument_spec,
- supports_check_mode=True)
-
- self.resizevdisk_flag = False
- self.expand_flag = False
- self.shrink_flag = False
-
- # logging setup
- log_path = self.module.params['log_path']
- log = get_logger(self.__class__.__name__, log_path)
- self.log = log.info
-
- # Required
- self.name = self.module.params['name']
- self.state = self.module.params['state']
-
- # Optional
- self.mdiskgrp = self.module.params['mdiskgrp']
- self.size = self.module.params['size']
- self.unit = self.module.params['unit']
- self.easytier = self.module.params.get('easytier', None)
- self.rsize = self.module.params['rsize']
- self.autoexpand = self.module.params['autoexpand']
-
- # Handling missing mandatory parameter name
- if not self.name:
- self.module.fail_json('Missing mandatory parameter: name')
-
- self.restapi = IBMSVCRestApi(
- module=self.module,
- clustername=self.module.params['clustername'],
- domain=self.module.params['domain'],
- username=self.module.params['username'],
- password=self.module.params['password'],
- validate_certs=self.module.params['validate_certs'],
- log_path=log_path,
- token=self.module.params['token']
- )
-
- def convert_to_bytes(self):
- return int(self.size) * (1024 ** (['b', 'kb', 'mb', 'gb', 'tb', 'pb'].index((self.unit).lower())))
-
- def get_existing_vdisk(self):
- self.log("Entering function get_existing_vdisk")
- cmd = 'lsvdisk'
- cmdargs = {}
- cmdopts = {'bytes': True}
- cmdargs = [self.name]
- existing_vdisk_data = self.restapi.svc_obj_info(cmd, cmdopts, cmdargs)
- return existing_vdisk_data
-
- # TBD: Implement a more generic way to check for properties to modify.
- def vdisk_probe(self, data):
- props = []
- # Check if change in vdisk size is required
- input_size = int(self.convert_to_bytes())
- actual_size = int(data[0]['capacity'])
- if self.size:
- if input_size != actual_size:
- props += ['resize']
- if input_size > actual_size:
- self.expand_flag = True
- self.change_in_size = input_size - actual_size
- else:
- self.shrink_flag = True
- self.change_in_size = actual_size - input_size
- # TBD: The parameter is easytier but the view has easy_tier label.
- if self.easytier:
- if self.easytier != data[1]['easy_tier']:
- props += ['easytier']
- self.log("vdisk_probe props='%s'", props)
- return props
-
- def detect_vdisk_type(self, data):
- isMirrored = False
- if data[0]['type'] == "many":
- isMirrored = True
- if not isMirrored:
- relationship_name = data[0]['RC_name']
- if relationship_name:
- rel_data = self.restapi.svc_obj_info(cmd='lsrcrelationship', cmdopts=None, cmdargs=[relationship_name])
- if rel_data['copy_type'] == "activeactive":
- isMirrored = True
- if isMirrored:
- self.module.fail_json(msg="Mirror volumes cannot be managed using this module.\
- To manage mirror volumes, module 'ibm_svc_manange_mirrored_volume' can be used")
-
- def resizevdisk(self):
- cmdopts = {}
- if self.expand_flag:
- cmd = "expandvdisksize"
- elif self.shrink_flag:
- cmd = "shrinkvdisksize"
- cmdopts["size"] = str(self.change_in_size)
- cmdopts["unit"] = "b"
- cmdargs = [self.name]
-
- self.restapi.svc_run_command(cmd, cmdopts, cmdargs)
- self.changed = True
-
- def vdisk_create(self):
- if not self.mdiskgrp:
- self.module.fail_json(msg="You must pass in "
- "mdiskgrp to the module.")
- if not self.size:
- self.module.fail_json(msg="You must pass in size to the module.")
- if not self.unit:
- self.module.fail_json(msg="You must pass in unit to the module.")
-
- if self.module.check_mode:
- self.changed = True
- return
-
- self.log("creating vdisk '%s'", self.name)
-
- # Make command
- cmd = 'mkvdisk'
- cmdopts = {}
- if self.mdiskgrp:
- cmdopts['mdiskgrp'] = self.mdiskgrp
- if self.size:
- cmdopts['size'] = self.size
- if self.unit:
- cmdopts['unit'] = self.unit
- if self.easytier:
- cmdopts['easytier'] = self.easytier
- if self.rsize:
- cmdopts['rsize'] = self.rsize
- if self.autoexpand:
- cmdopts['autoexpand'] = self.autoexpand
- cmdopts['name'] = self.name
- self.log("creating vdisk command %s opts %s", cmd, cmdopts)
-
- # Run command
- result = self.restapi.svc_run_command(cmd, cmdopts, cmdargs=None)
- self.log("create vdisk result %s", result)
-
- if 'message' in result:
- self.changed = True
- self.log("create vdisk result message %s", result['message'])
- else:
- self.module.fail_json(
- msg="Failed to create vdisk [%s]" % self.name)
-
- def vdisk_update(self, modify):
- self.log("updating vdisk '%s'", self.name)
- if 'resize' in modify and 'easytier' in modify:
- self.module.fail_json(msg="You cannot resize a volume while modifying other attributes")
- if self.module.check_mode:
- self.changed = True
- return
- if 'resize' in modify:
- self.resizevdisk()
- self.changed = True
- elif 'easytier' in modify:
- cmd = 'chvdisk'
- cmdopts = {}
- cmdopts['easytier'] = self.easytier
- cmdargs = [self.name]
-
- self.restapi.svc_run_command(cmd, cmdopts, cmdargs)
- # Any error will have been raised in svc_run_command
- # chvdisk does not output anything when successful.
- self.changed = True
-
- def vdisk_delete(self):
- if self.module.check_mode:
- self.changed = True
- return
-
- self.log("deleting vdisk '%s'", self.name)
-
- cmd = 'rmvdisk'
- cmdopts = None
- cmdargs = [self.name]
-
- self.restapi.svc_run_command(cmd, cmdopts, cmdargs)
-
- # Any error will have been raised in svc_run_command
- # chmvdisk does not output anything when successful.
- self.changed = True
-
- def apply(self):
- changed = False
- msg = None
- modify = []
-
- vdisk_data = self.get_existing_vdisk()
- if vdisk_data:
- self.detect_vdisk_type(vdisk_data)
- if self.state == 'absent':
- self.log("CHANGED: vdisk exists, but requested "
- "state is 'absent'")
- changed = True
- elif self.state == 'present':
- # This is where we detect if chvdisk or resize should be called
- modify = self.vdisk_probe(vdisk_data)
- if modify:
- changed = True
- else:
- if self.state == 'present':
- self.log("CHANGED: vdisk does not exist, "
- "but requested state is 'present'")
- changed = True
-
- if changed:
- if self.state == 'present':
- if not vdisk_data:
- self.vdisk_create()
- msg = "vdisk [%s] has been created." % self.name
- else:
- # This is where we would modify
- self.vdisk_update(modify)
- msg = "vdisk [%s] has been modified." % self.name
- elif self.state == 'absent':
- self.vdisk_delete()
- msg = "vdisk [%s] has been deleted." % self.name
-
- if self.module.check_mode:
- msg = 'skipping changes due to check mode'
- else:
- self.log("exiting with no changes")
- if self.state == 'absent':
- msg = "vdisk [%s] did not exist." % self.name
- else:
- msg = "vdisk [%s] already exists." % self.name
-
- self.module.exit_json(msg=msg, changed=changed)
-
-
-def main():
- v = IBMSVCvdisk()
- try:
- v.apply()
- except Exception as e:
- v.log("Exception in apply(): \n%s", format_exc())
- v.module.fail_json(msg="Module failed. Error [%s]." % to_native(e))
-
-
-if __name__ == '__main__':
- main()
diff --git a/ansible_collections/ibm/spectrum_virtualize/tests/unit/plugins/modules/test_ibm_svc_vdisk.py b/ansible_collections/ibm/spectrum_virtualize/tests/unit/plugins/modules/test_ibm_svc_vdisk.py
deleted file mode 100644
index a7d381dce..000000000
--- a/ansible_collections/ibm/spectrum_virtualize/tests/unit/plugins/modules/test_ibm_svc_vdisk.py
+++ /dev/null
@@ -1,473 +0,0 @@
-# Copyright (C) 2020 IBM CORPORATION
-# Author(s): Peng Wang <wangpww@cn.ibm.com>
-#
-# GNU General Public License v3.0+
-# (see COPYING or https://www.gnu.org/licenses/gpl-3.0.txt)
-
-""" unit tests IBM Spectrum Virtualize Ansible module: ibm_svc_vdisk """
-
-from __future__ import (absolute_import, division, print_function)
-__metaclass__ = type
-import unittest
-import pytest
-import json
-from mock import patch
-from ansible.module_utils import basic
-from ansible.module_utils._text import to_bytes
-from ansible_collections.ibm.spectrum_virtualize.plugins.module_utils.ibm_svc_utils import IBMSVCRestApi
-from ansible_collections.ibm.spectrum_virtualize.plugins.modules.ibm_svc_vdisk import IBMSVCvdisk
-
-
-def set_module_args(args):
- """prepare arguments so that they will be picked up during module
- creation """
- args = json.dumps({'ANSIBLE_MODULE_ARGS': args})
- basic._ANSIBLE_ARGS = to_bytes(args) # pylint: disable=protected-access
-
-
-class AnsibleExitJson(Exception):
- """Exception class to be raised by module.exit_json and caught by the
- test case """
- pass
-
-
-class AnsibleFailJson(Exception):
- """Exception class to be raised by module.fail_json and caught by the
- test case """
- pass
-
-
-def exit_json(*args, **kwargs): # pylint: disable=unused-argument
- """function to patch over exit_json; package return data into an
- exception """
- if 'changed' not in kwargs:
- kwargs['changed'] = False
- raise AnsibleExitJson(kwargs)
-
-
-def fail_json(*args, **kwargs): # pylint: disable=unused-argument
- """function to patch over fail_json; package return data into an
- exception """
- kwargs['failed'] = True
- raise AnsibleFailJson(kwargs)
-
-
-class TestIBMSVCvdisk(unittest.TestCase):
- """ a group of related Unit Tests"""
-
- @patch('ansible_collections.ibm.spectrum_virtualize.plugins.module_utils.'
- 'ibm_svc_utils.IBMSVCRestApi._svc_authorize')
- def setUp(self, connect):
- self.mock_module_helper = patch.multiple(basic.AnsibleModule,
- exit_json=exit_json,
- fail_json=fail_json)
- self.mock_module_helper.start()
- self.addCleanup(self.mock_module_helper.stop)
- self.restapi = IBMSVCRestApi(self.mock_module_helper, '1.2.3.4',
- 'domain.ibm.com', 'username', 'password',
- False, 'test.log', '')
-
- def set_default_args(self):
- return dict({
- 'name': 'test',
- 'state': 'present'
- })
-
- def test_module_fail_when_required_args_missing(self):
- """ required arguments are reported as errors """
- with pytest.raises(AnsibleFailJson) as exc:
- set_module_args({})
- IBMSVCvdisk()
- print('Info: %s' % exc.value.args[0]['msg'])
-
- @patch('ansible_collections.ibm.spectrum_virtualize.plugins.module_utils.'
- 'ibm_svc_utils.IBMSVCRestApi.svc_obj_info')
- @patch('ansible_collections.ibm.spectrum_virtualize.plugins.module_utils.'
- 'ibm_svc_utils.IBMSVCRestApi._svc_authorize')
- def test_get_existing_volume(self, svc_authorize_mock, svc_obj_info_mock):
- set_module_args({
- 'clustername': 'clustername',
- 'domain': 'domain',
- 'state': 'present',
- 'username': 'username',
- 'password': 'password',
- 'name': 'test_get_existing_volume',
- 'mdiskgrp': 'Ansible-Pool'
- })
- vol_ret = [{"id": "0", "name": "test_get_existing_volume",
- "IO_group_id": "0", "IO_group_name": "io_grp0",
- "status": "online", "mdisk_grp_id": "0",
- "mdisk_grp_name": "Pool_Ansible_collections",
- "capacity": "4.00GB", "type": "striped", "FC_id": "",
- "FC_name": "", "RC_id": "", "RC_name": "",
- "vdisk_UID": "6005076810CA0166C00000000000019F",
- "fc_map_count": "0", "copy_count": "1",
- "fast_write_state": "empty", "se_copy_count": "0",
- "RC_change": "no", "compressed_copy_count": "0",
- "parent_mdisk_grp_id": "0",
- "parent_mdisk_grp_name": "Pool_Ansible_collections",
- "owner_id": "", "owner_name": "", "formatting": "no",
- "encrypt": "no", "volume_id": "0",
- "volume_name": "volume_Ansible_collections",
- "function": "", "protocol": "scsi"}]
- svc_obj_info_mock.return_value = vol_ret
- vol = IBMSVCvdisk().get_existing_vdisk()
- self.assertEqual('test_get_existing_volume', vol[0]['name'])
- self.assertEqual('0', vol[0]['id'])
-
- @patch('ansible_collections.ibm.spectrum_virtualize.plugins.modules.'
- 'ibm_svc_vdisk.IBMSVCvdisk.vdisk_create')
- @patch('ansible_collections.ibm.spectrum_virtualize.plugins.modules.'
- 'ibm_svc_vdisk.IBMSVCvdisk.get_existing_vdisk')
- @patch('ansible_collections.ibm.spectrum_virtualize.plugins.module_utils.'
- 'ibm_svc_utils.IBMSVCRestApi._svc_authorize')
- def test_volume_create_get_existing_volume_called(
- self, svc_authorize_mock,
- get_existing_volume_mock,
- vdisk_create_mock):
- set_module_args({
- 'clustername': 'clustername',
- 'domain': 'domain',
- 'state': 'present',
- 'username': 'username',
- 'password': 'password',
- 'name': 'test_volume',
- 'mdiskgrp': 'Ansible-Pool',
- 'easytier': 'off',
- 'size': '4294967296',
- 'unit': 'b',
- })
- vol_created = IBMSVCvdisk()
- get_existing_volume_mock.return_value = []
- vdisk_create_mock.return_value = {
- u'message': u'Storage volume, id [0] successfully created',
- u'id': u'0'
- }
- with pytest.raises(AnsibleExitJson) as exc:
- vol_created.apply()
- self.assertTrue(exc.value.args[0]['changed'])
- get_existing_volume_mock.assert_called_with()
-
- @patch('ansible_collections.ibm.spectrum_virtualize.plugins.modules.'
- 'ibm_svc_vdisk.IBMSVCvdisk.get_existing_vdisk')
- @patch('ansible_collections.ibm.spectrum_virtualize.plugins.module_utils.'
- 'ibm_svc_utils.IBMSVCRestApi._svc_authorize')
- def test_create_volume_failed_since_missed_required_param(
- self, svc_authorize_mock, get_existing_volume_mock):
- set_module_args({
- 'clustername': 'clustername',
- 'domain': 'domain',
- 'state': 'present',
- 'username': 'username',
- 'password': 'password',
- 'name': 'test_create_volume_failed_since_missed_required_param',
- 'easytier': 'off',
- 'size': '4294967296',
- 'unit': 'b',
- })
- get_existing_volume_mock.return_value = []
- vol_created = IBMSVCvdisk()
- with pytest.raises(AnsibleFailJson) as exc:
- vol_created.apply()
- self.assertTrue(exc.value.args[0]['failed'])
- get_existing_volume_mock.assert_called_with()
-
- @patch('ansible_collections.ibm.spectrum_virtualize.plugins.modules.'
- 'ibm_svc_vdisk.IBMSVCvdisk.get_existing_vdisk')
- @patch('ansible_collections.ibm.spectrum_virtualize.plugins.modules.'
- 'ibm_svc_vdisk.IBMSVCvdisk.vdisk_probe')
- @patch('ansible_collections.ibm.spectrum_virtualize.plugins.module_utils.'
- 'ibm_svc_utils.IBMSVCRestApi._svc_authorize')
- def test_create_volume_but_volume_existed(self, svc_authorize_mock,
- volume_probe_mock,
- get_existing_volume_mock):
- set_module_args({
- 'clustername': 'clustername',
- 'domain': 'domain',
- 'state': 'present',
- 'username': 'username',
- 'password': 'password',
- 'name': 'test_create_volume_but_volume_existed',
- 'mdiskgrp': 'Ansible-Pool',
- 'easytier': 'off',
- 'size': '4294967296',
- 'unit': 'b',
- })
- vol_ret = [{"id": "0", "name": "volume_Ansible_collections",
- "IO_group_id": "0", "IO_group_name": "io_grp0",
- "status": "online", "mdisk_grp_id": "0",
- "mdisk_grp_name": "Pool_Ansible_collections",
- "capacity": "4.00GB", "type": "striped", "FC_id": "",
- "FC_name": "", "RC_id": "", "RC_name": "",
- "vdisk_UID": "6005076810CA0166C00000000000019F",
- "fc_map_count": "0", "copy_count": "1",
- "fast_write_state": "empty", "se_copy_count": "0",
- "RC_change": "no", "compressed_copy_count": "0",
- "parent_mdisk_grp_id": "0",
- "parent_mdisk_grp_name": "Pool_Ansible_collections",
- "owner_id": "", "owner_name": "", "formatting": "no",
- "encrypt": "no", "volume_id": "0",
- "volume_name": "volume_Ansible_collections",
- "function": "", "protocol": "scsi"}]
- get_existing_volume_mock.return_value = vol_ret
- volume_probe_mock.return_value = []
- volume_created = IBMSVCvdisk()
- with pytest.raises(AnsibleExitJson) as exc:
- volume_created.apply()
- self.assertFalse(exc.value.args[0]['changed'])
- get_existing_volume_mock.assert_called_with()
-
- @patch('ansible_collections.ibm.spectrum_virtualize.plugins.modules.'
- 'ibm_svc_vdisk.IBMSVCvdisk.get_existing_vdisk')
- @patch('ansible_collections.ibm.spectrum_virtualize.plugins.modules.'
- 'ibm_svc_vdisk.IBMSVCvdisk.vdisk_create')
- @patch('ansible_collections.ibm.spectrum_virtualize.plugins.module_utils.'
- 'ibm_svc_utils.IBMSVCRestApi._svc_authorize')
- def test_create_volume_successfully(self, svc_authorize_mock,
- volume_create_mock,
- get_existing_volume_mock):
- set_module_args({
- 'clustername': 'clustername',
- 'domain': 'domain',
- 'state': 'present',
- 'username': 'username',
- 'password': 'password',
- 'name': 'test_create_volume_but_volume_existed',
- 'mdiskgrp': 'Ansible-Pool',
- 'easytier': 'off',
- 'size': '4294967296',
- 'unit': 'b',
- })
- volume = {u'message': u'Storage volume, id [0], '
- u'successfully created', u'id': u'0'}
- volume_create_mock.return_value = volume
- get_existing_volume_mock.return_value = []
- volume_created = IBMSVCvdisk()
- with pytest.raises(AnsibleExitJson) as exc:
- volume_created.apply()
- self.assertTrue(exc.value.args[0]['changed'])
- get_existing_volume_mock.assert_called_with()
-
- @patch('ansible_collections.ibm.spectrum_virtualize.plugins.modules.'
- 'ibm_svc_vdisk.IBMSVCvdisk.get_existing_vdisk')
- @patch('ansible_collections.ibm.spectrum_virtualize.plugins.module_utils.'
- 'ibm_svc_utils.IBMSVCRestApi.svc_run_command')
- @patch('ansible_collections.ibm.spectrum_virtualize.plugins.module_utils.'
- 'ibm_svc_utils.IBMSVCRestApi._svc_authorize')
- def test_create_volume_failed_since_no_message_in_result(
- self, svc_authorize_mock, svc_run_command_mock,
- get_existing_volume_mock):
- set_module_args({
- 'clustername': 'clustername',
- 'domain': 'domain',
- 'state': 'present',
- 'username': 'username',
- 'password': 'password',
- 'name': 'test_create_volume_but_volume_existed',
- 'mdiskgrp': 'Ansible-Pool',
- 'easytier': 'off',
- 'size': '4294967296',
- 'unit': 'b',
- })
- volume = {u'id': u'0'}
- svc_run_command_mock.return_value = volume
- get_existing_volume_mock.return_value = []
- volume_created = IBMSVCvdisk()
- with pytest.raises(AnsibleFailJson) as exc:
- volume_created.apply()
- get_existing_volume_mock.assert_called_with()
-
- @patch('ansible_collections.ibm.spectrum_virtualize.plugins.modules.'
- 'ibm_svc_vdisk.IBMSVCvdisk.get_existing_vdisk')
- @patch('ansible_collections.ibm.spectrum_virtualize.plugins.module_utils.'
- 'ibm_svc_utils.IBMSVCRestApi._svc_authorize')
- def test_delete_volume_but_volume_not_existed(self, svc_authorize_mock,
- get_existing_volume_mock):
- set_module_args({
- 'clustername': 'clustername',
- 'domain': 'domain',
- 'state': 'absent',
- 'username': 'username',
- 'password': 'password',
- 'name': 'test_create_volume_but_volume_existed',
- 'mdiskgrp': 'Ansible-Pool',
- 'size': '4294967296',
- 'unit': 'b',
- })
- get_existing_volume_mock.return_value = []
- volume_deleted = IBMSVCvdisk()
- with pytest.raises(AnsibleExitJson) as exc:
- volume_deleted.apply()
- self.assertFalse(exc.value.args[0]['changed'])
- get_existing_volume_mock.assert_called_with()
-
- @patch('ansible_collections.ibm.spectrum_virtualize.plugins.modules.'
- 'ibm_svc_vdisk.IBMSVCvdisk.get_existing_vdisk')
- @patch('ansible_collections.ibm.spectrum_virtualize.plugins.modules.'
- 'ibm_svc_vdisk.IBMSVCvdisk.vdisk_delete')
- @patch('ansible_collections.ibm.spectrum_virtualize.plugins.module_utils.'
- 'ibm_svc_utils.IBMSVCRestApi._svc_authorize')
- def test_delete_volume_successfully(self, svc_authorize_mock,
- volume_delete_mock,
- get_existing_volume_mock):
- set_module_args({
- 'clustername': 'clustername',
- 'domain': 'domain',
- 'state': 'absent',
- 'username': 'username',
- 'password': 'password',
- 'name': 'test_delete_volume_successfully',
- })
- vol_ret = [{"id": "0", "name": "volume_Ansible_collections",
- "IO_group_id": "0", "IO_group_name": "io_grp0",
- "status": "online", "mdisk_grp_id": "0",
- "mdisk_grp_name": "Pool_Ansible_collections",
- "capacity": "4.00GB", "type": "striped", "FC_id": "",
- "FC_name": "", "RC_id": "", "RC_name": "",
- "vdisk_UID": "6005076810CA0166C00000000000019F",
- "fc_map_count": "0", "copy_count": "1",
- "fast_write_state": "empty", "se_copy_count": "0",
- "RC_change": "no", "compressed_copy_count": "0",
- "parent_mdisk_grp_id": "0",
- "parent_mdisk_grp_name": "Pool_Ansible_collections",
- "owner_id": "", "owner_name": "", "formatting": "no",
- "encrypt": "no", "volume_id": "0",
- "volume_name": "volume_Ansible_collections",
- "function": "", "protocol": "scsi"}]
- get_existing_volume_mock.return_value = vol_ret
- volume_deleted = IBMSVCvdisk()
- with pytest.raises(AnsibleExitJson) as exc:
- volume_deleted.apply()
- self.assertTrue(exc.value.args[0]['changed'])
- get_existing_volume_mock.assert_called_with()
-
- @patch('ansible_collections.ibm.spectrum_virtualize.plugins.modules.'
- 'ibm_svc_vdisk.IBMSVCvdisk.get_existing_vdisk')
- @patch('ansible_collections.ibm.spectrum_virtualize.plugins.modules.'
- 'ibm_svc_vdisk.IBMSVCvdisk.vdisk_probe')
- @patch('ansible_collections.ibm.spectrum_virtualize.plugins.module_utils.'
- 'ibm_svc_utils.IBMSVCRestApi._svc_authorize')
- def test_create_thin_volume_but_volume_existed(self, svc_authorize_mock, volume_probe_mock, get_existing_volume_mock):
- set_module_args({
- 'clustername': 'clustername',
- 'domain': 'domain',
- 'state': 'present',
- 'username': 'username',
- 'password': 'password',
- 'name': 'test_create_volume_but_volume_existed',
- 'mdiskgrp': 'Ansible-Pool',
- 'easytier': 'off',
- 'size': '4294967296',
- 'unit': 'b',
- 'rsize': '20%',
- 'autoexpand': True
- })
- vol_ret = [{"id": "0", "name": "volume_Ansible_collections",
- "IO_group_id": "0", "IO_group_name": "io_grp0",
- "status": "online", "mdisk_grp_id": "0",
- "mdisk_grp_name": "Pool_Ansible_collections",
- "capacity": "4.00GB", "type": "striped", "FC_id": "",
- "FC_name": "", "RC_id": "", "RC_name": "",
- "vdisk_UID": "6005076810CA0166C00000000000019F",
- "fc_map_count": "0", "copy_count": "1",
- "fast_write_state": "empty", "se_copy_count": "0",
- "RC_change": "no", "compressed_copy_count": "0",
- "parent_mdisk_grp_id": "0",
- "parent_mdisk_grp_name": "Pool_Ansible_collections",
- "owner_id": "", "owner_name": "", "formatting": "no",
- "encrypt": "no", "volume_id": "0",
- "volume_name": "volume_Ansible_collections",
- "function": "", "protocol": "scsi"}]
- get_existing_volume_mock.return_value = vol_ret
- volume_probe_mock.return_value = []
- volume_created = IBMSVCvdisk()
- with pytest.raises(AnsibleExitJson) as exc:
- volume_created.apply()
- self.assertFalse(exc.value.args[0]['changed'])
- get_existing_volume_mock.assert_called_with()
-
- @patch('ansible_collections.ibm.spectrum_virtualize.plugins.modules.'
- 'ibm_svc_vdisk.IBMSVCvdisk.get_existing_vdisk')
- @patch('ansible_collections.ibm.spectrum_virtualize.plugins.modules.'
- 'ibm_svc_vdisk.IBMSVCvdisk.vdisk_create')
- @patch('ansible_collections.ibm.spectrum_virtualize.plugins.module_utils.'
- 'ibm_svc_utils.IBMSVCRestApi._svc_authorize')
- def test_create_thin_volume_successfully(self, svc_authorize_mock, volume_create_mock, get_existing_volume_mock):
- set_module_args({
- 'clustername': 'clustername',
- 'domain': 'domain',
- 'state': 'present',
- 'username': 'username',
- 'password': 'password',
- 'name': 'test_create_volume_but_volume_existed',
- 'mdiskgrp': 'Ansible-Pool',
- 'easytier': 'off',
- 'size': '4294967296',
- 'unit': 'b',
- 'rsize': '20%'
- })
- volume = {u'message': u'Storage volume, id [0], '
- u'successfully created', u'id': u'0'}
- volume_create_mock.return_value = volume
- get_existing_volume_mock.return_value = []
- volume_created = IBMSVCvdisk()
- with pytest.raises(AnsibleExitJson) as exc:
- volume_created.apply()
- self.assertTrue(exc.value.args[0]['changed'])
- get_existing_volume_mock.assert_called_with()
-
- @patch('ansible_collections.ibm.spectrum_virtualize.plugins.modules.'
- 'ibm_svc_vdisk.IBMSVCvdisk.get_existing_vdisk')
- @patch('ansible_collections.ibm.spectrum_virtualize.plugins.modules.'
- 'ibm_svc_vdisk.IBMSVCvdisk.vdisk_create')
- @patch('ansible_collections.ibm.spectrum_virtualize.plugins.module_utils.'
- 'ibm_svc_utils.IBMSVCRestApi._svc_authorize')
- def test_create_thin_volume_successfully_with_autoexpand(self, svc_authorize_mock, volume_create_mock, get_existing_volume_mock):
- set_module_args({
- 'clustername': 'clustername',
- 'domain': 'domain',
- 'state': 'present',
- 'username': 'username',
- 'password': 'password',
- 'name': 'test_create_volume_but_volume_existed',
- 'mdiskgrp': 'Ansible-Pool',
- 'easytier': 'off',
- 'size': '4294967296',
- 'unit': 'b',
- 'rsize': '20%',
- 'autoexpand': True
- })
- volume = {u'message': u'Storage volume, id [0], '
- u'successfully created', u'id': u'0'}
- volume_create_mock.return_value = volume
- get_existing_volume_mock.return_value = []
- volume_created = IBMSVCvdisk()
- with pytest.raises(AnsibleExitJson) as exc:
- volume_created.apply()
- self.assertTrue(exc.value.args[0]['changed'])
- get_existing_volume_mock.assert_called_with()
-
- @patch('ansible_collections.ibm.spectrum_virtualize.plugins.module_utils.'
- 'ibm_svc_utils.IBMSVCRestApi._svc_authorize')
- def test_convert_to_bytes(self, svc_authorize_mock):
- set_module_args({
- 'clustername': 'clustername',
- 'domain': 'domain',
- 'state': 'present',
- 'username': 'username',
- 'password': 'password',
- 'name': 'test_create_volume_but_volume_existed',
- 'mdiskgrp': 'Ansible-Pool',
- 'easytier': 'off',
- 'size': '2',
- 'unit': 'gb',
- 'rsize': '20%',
- 'autoexpand': True
- })
- v = IBMSVCvdisk()
- data = v.convert_to_bytes()
- self.assertEqual(2147483648, data)
-
-
-if __name__ == '__main__':
- unittest.main()