summaryrefslogtreecommitdiffstats
path: root/cns-libs/cnslibs/common/heketi_libs.py
Commit message (Collapse)AuthorAgeFilesLines
* Merged HeketiBaseClass to BaseClassvamahaja2019-02-221-120/+0
| | | | | | | | | | | Renamed cns_baseclass.py to baseclass.py with updated BaseClass. Merged HeketiBaseClass to BaseClass with appropriate changes. Updated delete_volumes and delete_block_volumes methods used in test case method with heketi_delete_volume and heketi_blockvolume- delete. Change-Id: I8f623f1692cd863dc8ff041f7e8525ee0dc84f7b Signed-off-by: vamahaja <vamahaja@redhat.com>
* Add possibility to skip test cases and cleanups after failureValerii Ponomarov2019-02-051-2/+2
| | | | | | | | | | | | | In some cases, it is useful to stop test execution after first failure. Not only stop it, but also skip all the scheduled cleanups. It will allow us to keep a cluster in the best state for a root cause debugging. Just define 'common.stop_on_first_failure' option to True value in the config file. It will make the test runner stop after first failure skipping all the scheduled cleanups and pending test cases. Change-Id: I963eb038a11a8e2088a84f7ba4838870ea3e657a
* Refactor config optionsValerii Ponomarov2018-12-251-26/+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
* Add abstraction between deployment types and gluster commandsValerii Ponomarov2018-12-251-17/+10
| | | | | | | | | | | | | | | | | | | | | | | | Now, it is possible to run glustolibs commands on both deployment types: containerized and standalone. It is possible using 'auto_get_gluster_endpoint' as target for lib function in addition to the '@podcmd.GlustoPod()' decorator. Example: """ from glustolibs.gluster.volume_ops import get_volume_list from cnslibs.common import heketi_libs from cnslibs.common import podcmd class TestExample(heketi_libs.HeketiBaseClass): @podcmd.GlustoPod() def test_get_vol_list_either_on_node_or_on_pod(self): volumes = get_volume_list('auto_get_gluster_endpoint') """ Also, delete all the current usages of 'deployment_type' config option, and delete the option as unneeded anymore. Change-Id: I281f287c432a5a9efefda588be436ee285188697
* Cleanup heketi config optionsValerii Ponomarov2018-12-191-6/+0
| | | | | | | Removing several unused options and replacing couple of them with built-in values. Change-Id: I458f0eae6a68ddcb2711d454c81cdcee8142673a
* Cleanup unused library functionsValerii Ponomarov2018-12-151-66/+5
| | | | Change-Id: I8b62298b45f9e6af45dde60aae6c80c79d312dad
* Add test cases for gluster-blockAshmitha Ambastha2018-11-071-1/+20
| | | | | Change-Id: I5ce399b39201dfb09d4ad459a039d938596a71e4 Signed-off-by: Ashmitha <asambast@redhat.com>
* CNS: adding testcase CNS-450 - Restart heketi podApeksha D Khakharia2018-10-311-0/+2
| | | | | Change-Id: Ie68628cb0f083fd5cd1ec9cd88a4c490bfca2e88 Signed-off-by: Apeksha D Khakharia <akhakhar@redhat.com>
* Add support of heketi_cli_user and heketi_cli_keyValerii Ponomarov2018-02-201-9/+13
| | | | | | | | | | | | 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
* Adding delete volumes functionmandaltapesh2018-01-181-1/+26
| | | | | Change-Id: I36dfea0d9c1715a015fc14183f1dce39cbc20eb2 Signed-off-by: mandaltapesh <tmandal@redhat.com>
* Added code for initializing pod_name if deployment_type is cnsArthy Loganathan2017-12-131-0/+22
| | | | | Change-Id: I033e2faa9400aed5c6b293fdfc5f0c327562f206 Signed-off-by: Arthy Loganathan <aloganat@redhat.com>
* Heketi library functions for topology, volume operation,Arthy Loganathan2017-12-081-0/+140
HeketiBaseClass and initial set of heketi volume testcases Change-Id: Ib700cc9ffc4bf510affdbb45710c5b27c6c7ce44 Signed-off-by: Arthy Loganathan <aloganat@redhat.com>