summaryrefslogtreecommitdiffstats
path: root/cns-libs/cnslibs/common/podcmd.py
Commit message (Collapse)AuthorAgeFilesLines
* Reorder lib files removing redundant dir layerValerii Ponomarov2019-03-181-141/+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 abstraction between deployment types and gluster commandsValerii Ponomarov2018-12-251-5/+20
| | | | | | | | | | | | | | | | | | | | | | | | 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
* CNS: adding libraries and 2 testcases for pv resizeApeksha D Khakharia2018-10-181-4/+10
| | | | | Change-Id: Idae22a28e4da867fd0567cbec49760d6f3a374f6 Signed-off-by: Apeksha D Khakharia <akhakhar@redhat.com>
* add a utility library to support patching glusto for pod supportJohn Mulligan2018-01-101-0/+120
This module provides the ability to patch the glusto run method with the ability to run commands in pods. This module implements the custom run method and a helper class that acts as a context manager or decorator to patch glusto. This version adds a log_level argument to oc_rsh in order to plumb the argument all the way through to the inner glusto.run method. It also cleans up some the docstrings and variable names. Change-Id: I0eeea234b1af5e60e41aae63e46e2d816e8929d2 Signed-off-by: John Mulligan <jmulligan@redhat.com>