summaryrefslogtreecommitdiffstats
path: root/cns-libs/cnslibs/common/heketi_ops.py
Commit message (Collapse)AuthorAgeFilesLines
* Reorder lib files removing redundant dir layerValerii Ponomarov2019-03-181-1516/+0
| | | | | | | | | | | | Move all the files of 'cns-libs/cnslibs/common' dir to the 'openshift-storage-libs/openshiftstoragelibs', because 'common' is the only dir there, which doesn't really makes sense. And "cns" is old project name, so, replace it with "openshift-storage-libs". Also, fix all the imports of these libs. Change-Id: Ife00a73554e73b21b214b15016b0c8dbbf423446
* Add Heketi version checksnigoyal2019-02-041-0/+21
| | | | | | | | | Add Heketi version checks to the test cases and Heketi libraries. In case of incompatible Heketi version in a setup, test cases will be skipped and direct usage of Heketi libraries will cause them to raise the NotImplementedError exceptions. Change-Id: I462e76f615165140f2a8c7e796c1c582b8f4dc91
* adding library and test case for examine glusternigoyal2019-02-011-0/+38
| | | | | | | | This library is helpfull for diagnosing output of gluster and heketi and it compare both the outputs and the test case verify this feature is working properly. Change-Id: Ice607003f32db2bce2f540a7651024b66b071634
* Add time limit for curl commandsValerii Ponomarov2019-01-251-2/+2
| | | | | | | | In case of network problems, "curl" command may stuck in a retry-loop. So, add explicit time-limit as 10 seconds to avoid endless waiting of the functions which use it. Change-Id: Ia2d94358e8f978cb73360535167c703da2636874
* Fix setting of gluster volume options in "heketi_volume_create" funcSri Vignesh2019-01-081-3/+3
| | | | | | | | "heketi-cli" requires quotes for "--gluster-volume-options" arg. Without it command will fail. So, add missing quotes to make it work. Change-Id: I17fddfe653dceaa3c6b56f2a473ca7798de02698 Signed-off-by: Sri Vignesh <sselvan@redhat.com>
* Refactor config optionsValerii Ponomarov2018-12-251-4/+8
| | | | | | | | | | | | | | | | | | | Doing following: - Rename top-level config option group called 'cns' to the 'openshift'. - Rename 'cns.setup.cns_project_name' option to the 'openshift.storage_project_name'. - Rename 'scale' option to the 'openshift.scale'. - Delete ''devices' and 'zone' options from 'gluster_servers' config group. - Delete 'cns.setup.cnd_username' option as unneeded. - Delete 'cns.setup.cnd_password' option as unneeded. - Delete 'oc_login' common function as unneeded after deletion of 'cns.setup.cnd_username' and 'cns.setup.cnd_password' options. - Remove 'Cns' word from base classes. - Keep backwards compatibility for old options to make transition be smooth. Change-Id: I04ddbbad5f64ffeac79a6744480d33a263d63001
* Rework 'heketi_ops' moduleValerii Ponomarov2018-12-161-1557/+633
| | | | | | | | | | | | Doing following: - Remove dead code with usage of Heketi python lib. Because it is not used and not tested. - Remove unused functions in general. - Make existing functions raise exceptions with CLI error message instead of returning 'False' boolean value hiding info about original errors. Change-Id: I1f0def567dd77425397ff2c8ba13f9c0640af5bc
* [CNS-1314][CNS-1285] Restart gluster block volumes and validatevamahaja2018-12-101-44/+2
| | | | | Change-Id: Ib7e3125e5120a91fe431816b33be4d4e6f15078e Signed-off-by: vamahaja <vamahaja@redhat.com>
* test cases for heketi metricsnigoyal2018-11-061-0/+29
| | | | | | | | | | CNS-1243 - Heketi_metrics_generate CNS-1244 - Heketi_metrics_validating_VolumeCount_on_creation CNS-1245 - Heketi_metrics_validating_VolumeCount_on_deletion CNS-1262 - Heketi-metrics_validating_heketi_pod failure Change-Id: Idb863d1ceaf555dfc2a9cff863b97cda65a816f6 Signed-off-by: nigoyal <nigoyal@redhat.com>
* [CNS-584] [CNS-1390] test cases for glusterfsnigoyal2018-11-061-3/+6
| | | | | | | | | | | CNS-584 Verify PVC deletion while pod is running This test case is verifying the glusterfs pvc deletion while pod is running and expectation is that pvc should not delete CNS-1390 - Retain policy - glusterfs - delete pvc This test case is verifying the retain policy of pvc and expectation is that when we delete pvc pv should not get deleted. Change-Id: Idefa36afdd8bc80835631863370273b4c86bccfc
* [CNS-1393-1395] Restart gluster services then validate volumesvamahaja2018-11-051-2/+46
| | | | | Change-Id: I58f8628c352556ac30c31777707b52cc2aea48ac Signed-off-by: vamahaja <vamahaja@redhat.com>
* Fix all existing pep8 errorsValerii Ponomarov2018-10-231-34/+32
| | | | Change-Id: I97c949614ca70ea3e732c8c2ca70022d062ad04c
* [CNS-550] Try to create block volume exceeding free spaceValerii Ponomarov2018-10-181-2/+2
| | | | | | | Validate behaviour of the system when we try to create block volume of size bigger than we have available free space. Change-Id: I754e09f7fc27ce9b7ac2b01dda163ce20573e963
* cnslibs:heketi_ops: remove dead code in heketi_volume_create()Michael Adam2018-10-151-1/+0
| | | | | Change-Id: Ic363aed46b73326bdbbffd85b077a13c92501f55 Signed-off-by: Michael Adam <madam@redhat.com>
* Refactor 'test_disabling_device' test moduleValerii Ponomarov2018-09-171-22/+22
| | | | | | | | The single test in this module passes only in small amount of Heketi cluster states. So, refactor it completely to be reliable making it fail only on proper errors. Change-Id: I29251d4265ec5916d41bd3d69e21492f89097337
* Add libraries for arbiternitin goyal2018-08-271-0/+157
| | | | | | | Which allow to set and remove tags on Heketi node and devices. Change-Id: Iaca652b059e58951f20bc975bf5724f6a5d0ca0e Signed-off-by: nitin goyal <nigoyal@redhat.com>
* Refactor 'heketi_node_list' functionValerii Ponomarov2018-07-191-42/+26
| | | | | | | | | | | | | | | | Do following improvements to this function: - Remove support of python Heketi client, because it is dead code. It is dead code, because all of the tests which use this function, explicitly depend on the CLI output, not being compatible with it. - Remove useless 'json' arg, as CLI client does not support it for 'node list' command. - Parse list of node IDs in it, not delegating this to the consumer. - Raise exception in case we failed to get list of nodes And, of course, update all the places where this function is used. Making those places use less code compared to previous variant. Change-Id: I3f1ffe6082541e63dc3d638c19c54086aa12580f
* CNS: adding testcase and library for volnameprefixApeksha D Khakharia2018-05-081-0/+49
| | | | | Change-Id: I84968bcfe19aa8af73f185be178079a8373915b3 Signed-off-by: Apeksha D Khakharia <akhakhar@redhat.com>
* Add support of heketi_cli_user and heketi_cli_keyValerii Ponomarov2018-02-201-36/+105
| | | | | | | | | | | | Just define following config options: cns: heketi_config: heketi_cli_user: 'admin' heketi_cli_key: 'some_secret_admin_key' To make heketi tests use specific creds for auth. Change-Id: I60f6d6e3922de6602d8fd39656132a23f18ffc8c
* raw_cli_output option for volume and device related methodsmandaltapesh2018-01-111-24/+89
| | | | | | | | | It is a requirement for validating negative testcases. The message helps in determining whether the failure is due to a desired/valid reason. Change-Id: I618ba9a88756fc9970341f632eac827bdb5a6f66 Signed-off-by: mandaltapesh <tmandal@redhat.com>
* Heketi library functions for topology, volume operation,Arthy Loganathan2017-12-081-0/+2022
HeketiBaseClass and initial set of heketi volume testcases Change-Id: Ib700cc9ffc4bf510affdbb45710c5b27c6c7ce44 Signed-off-by: Arthy Loganathan <aloganat@redhat.com>