summaryrefslogtreecommitdiffstats
path: root/glustolibs-gluster/glustolibs/gluster/volume_ops.py
Commit message (Collapse)AuthorAgeFilesLines
* [Libfix] Remove tier libraries from glusto-testsBala Konda Reddy M2020-07-081-91/+68
| | | | | | | | | | | | Tier libraries are not used across test cases and due to checks across brick_libs.py and volume_libs.py, performance of regular test cases(time taken for execution) is getting degraded. One more factor to remove Tier libraries across glusto-tests is, the functionality is deprecated. Change-Id: Ie56955800515b2ff5bb3b55debaad0fd88b5ab5e Signed-off-by: Bala Konda Reddy M <bala12352@gmail.com>
* [Lib] Add get_gluster_state methodPranav2020-04-151-1/+79
| | | | | | | | | The method executes the 'gluster get-state' command on the specified node and verifies the glusterd state dump, reads it and returns the content as a dictionary Change-Id: I0356ccf740fd97d1930e9f09d6111304b14cd015 Signed-off-by: Pranav <prprakas@redhat.com>
* [Lib Fix] Typo leading to error not being publishednchilaka2020-02-191-1/+1
| | | | | | | | Instead of calling g.log.error, we were calling g.log.err Due to this instead of throwing the right error message in, say, when doing volume cleanup, it was throwing ambiguos traceback. Change-Id: I39887ce08756eaf29df2d99f73cc7795a4d2c065
* [py2to3] Change str to list in isinstance()kshithijiyer2020-01-091-1/+1
| | | | | | | | | | | | Use 'list' object type in comparisons instead of 'str' Because it is differently treated in py2 and py3. Example: In py2 isinstance(u'foo', str) is False In py3 isinstance(u'foo', str) is True Change-Id: I7663d42494bf59d74550ff4897379d35cc357db4 Signed-off-by: kshithijiyer <kshithij.ki@gmail.com>
* Add library to reset particular volume optionVinayak Papnoi2019-07-311-0/+35
| | | | | | | | | | | | | Currently there is a library to reset the volume entirely. There needs to be a library to reset a particular volume option because if a user has set a lot of other volume options then it becomes a tedious job to reset and set the other options explicitly. The library function 'reset_volume_option' takes particular volume options as a string and resets it. Change-Id: I2049ea4a49d321d921d940f34e124d1f34bfa068 Signed-off-by: Vinayak Papnoi <vpapnoi@redhat.com>
* Fix spelling mistake across the codebaseNigel Babu2018-08-071-1/+1
| | | | Change-Id: I46fc2feffe6443af6913785d67bf310838532421
* Tests: ensure volume deletion works when intended.Yaniv Kaul2018-07-171-13/+46
| | | | | | | | | | | It could have failed without anyone noticing. Added 'xfail' - do we expect to fail in deletion (and changed tests accordingly) On the way, ensure stdout and stderr are logged in case of such failures. Change-Id: Ibdf7a43cadb0393707a6c68c19a664453a971eb1 Signed-off-by: Yaniv Kaul <ykaul@redhat.com>
* 1) bring_bricks_online: Wait for bricks to be online for 30 secondsShwethaHP2017-08-281-2/+2
| | | | | | | | | after bringing them online. 2) log all the xml output/error to DEBUG log level. Change-Id: If6bb758ac728f299292def9d72c0ef166a1569ae Signed-off-by: ShwethaHP <spandura@redhat.com>
* Fixing the BVT Issues:ShwethaHP2017-08-191-5/+7
| | | | | | | | | | | | | | | 1) self-heal failures: With the recent changes made to gluster for the bug: https://bugzilla.redhat.com/show_bug.cgi?id=1480423, the location of the brick process pid's changed to /var/run/gluster. Making the corresponding changes to glusto-tests libraries. Moving away from referring to pid file to grep for the process with the brick name. This fixes the issue. 2) Group options not being set properly: Since we were popping the 'group' option from the 'options' dictionary after the group options being set to set the other volume options, the option gets removed from the g.config['gluster']['smb_volume_options'] as well. Hence perform a deep copy of the dict before modifying the dict. Change-Id: I293bf81913857cb0327f30aa1db5aaa9be5a318e Signed-off-by: ShwethaHP <spandura@redhat.com>
* Providing configs to set volume options, group options when exporting volume ↵ShwethaHP2017-08-091-0/+14
| | | | | | | | | | | | | | | as 'smb share', 'nfs-ganesha export' in the config yml. Reading the configs in the gluster_base_class and setting those configs when exporting the volumes as 'smb share' or 'nfs-ganesha export'. recommended options when exporting volume as 'smb share': group: "metadata-cache" cache-samba-metadata: "on" Change-Id: I86a118c7015eaedd849a0f6e8b613605df5b6c32 Signed-off-by: ShwethaHP <spandura@redhat.com>
* Clean up pyflakes and pep8 errorsNigel Babu2016-12-121-8/+4
| | | | | Change-Id: Ibdd092118d3bb912716c46fd278ef3c680a6e742 Signed-off-by: Nigel Babu <nigelb@redhat.com>
* Modifying the glusterbaseclass not to update the defaul values to global config.Shwetha Panduranga2016-12-051-1/+1
| | | | | | | | | For example: if 'volname' is not in mount, then do not update the default volname in g.config['mount']. Change-Id: Ib547b51372b16a08b07c11a5dcf70feca8674075 Signed-off-by: Shwetha Panduranga <spandura@redhat.com>
* Added volume_list() and get_volume_list() in volume_ops.pyArthy Loganathan2016-10-251-0/+57
| | | | | Change-Id: I66339659158efd3af466ccd83aa243011eee61d8 Signed-off-by: Arthy Loganathan <aloganat@redhat.com>
* Adding library functions for bitrot, quota, rebalance, tiering, snap and ↵Arthy Loganathan2016-10-051-0/+705
volume ops Change-Id: Iadb0772fc338f5dffd485b2526babaffb3494be6 Signed-off-by: Arthy Loganathan <aloganat@redhat.com>