Useful tools to interact with Resource Locker Project
Project description
Useful tools to work with Rlocker project API
Quick Start
Normal installation
pip install rlockertools
Setup
git clone https://github.com/jimdevops19/rlockertools.git
cd rlockertools
python -m venv venv
source venv/bin/activate
python setup.py install
rlock --help
usage: rlock [-h] --server-url SERVER_URL --token TOKEN [--release] [--lock] [--signoff SIGNOFF] [--priority PRIORITY] [--search-string SEARCH_STRING] [--link LINK] [--interval INTERVAL]
[--attempts ATTEMPTS]
optional arguments:
-h, --help show this help message and exit
--server-url SERVER_URL
The URL of the Resource Locker Server
--token TOKEN Token of the user that creates API calls
--release Use this argument to release a resource
--lock Use this argument to lock a resource
--signoff SIGNOFF Use this when lock=True, locking a resource requires signoff
--priority PRIORITY Use this when lock=True, specify the level of priority the resource should be locked
--search-string SEARCH_STRING
Use this when lock=True, specify the lable or the name of the lockable resource
--link LINK Use this when lock=True, specify the link of the CI/CD pipeline that locks the resource
--interval INTERVAL Use this when lock=True, how many seconds to wait between each call while checking for a free resource
--attempts ATTEMPTS Use this when lock=True, how many times to create an API call that will check for a free resource
Usage Examples
To add a queue for locking a resource
rlock --lock --server-url=your.rlocker.instance.com --token=YOURTOKEN --search-string=nameorlabel --signoff=YOURUNIQUESIGNOFF --priority=3 --interval=15 --attempts=15
To release a locked resource (filtration by signoff only)
rlock --release --server-url=your.rlocker.instance.com --token=YOURTOKEN --signoff=YOURUNIQUESIGNOFF
Change log
[0.0.1] - 2021-03-15
Project details
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
rlockertools-0.3.6.tar.gz
(8.2 kB
view details)
Built Distributions
rlockertools-0.3.6-py3.8.egg
(17.5 kB
view details)
File details
Details for the file rlockertools-0.3.6.tar.gz
.
File metadata
- Download URL: rlockertools-0.3.6.tar.gz
- Upload date:
- Size: 8.2 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/3.4.0 importlib_metadata/3.7.3 packaging/20.8 pkginfo/1.7.0 requests/2.24.0 requests-toolbelt/0.9.1 tqdm/4.59.0 CPython/3.8.5
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | 2c2ff6b97842f8b017b3f5f18dde4155eade89a57699290024c0621b85748fa1 |
|
MD5 | 7f1cb39d95700e406986b24c12a3c414 |
|
BLAKE2b-256 | 3d2b85dd70629f9301271d1903bd666e927b157a97c81e87a17988e93e3b8b44 |
Provenance
File details
Details for the file rlockertools-0.3.6-py3.8.egg
.
File metadata
- Download URL: rlockertools-0.3.6-py3.8.egg
- Upload date:
- Size: 17.5 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/3.4.0 importlib_metadata/3.7.3 packaging/20.8 pkginfo/1.7.0 requests/2.24.0 requests-toolbelt/0.9.1 tqdm/4.59.0 CPython/3.8.5
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | 29777894c0dea298a3a1c4633585dc05abe465b5cc4e347ade26fbdef5be85c1 |
|
MD5 | ecac557fbce81108db5c5b10b602eeab |
|
BLAKE2b-256 | c7610737536eb0cdfa8c614b4a0d7308dc8e1b67e32e48142056c5c7b4415170 |
Provenance
File details
Details for the file rlockertools-0.3.6-py3-none-any.whl
.
File metadata
- Download URL: rlockertools-0.3.6-py3-none-any.whl
- Upload date:
- Size: 8.9 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/3.4.0 importlib_metadata/3.7.3 packaging/20.8 pkginfo/1.7.0 requests/2.24.0 requests-toolbelt/0.9.1 tqdm/4.59.0 CPython/3.8.5
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | 1121b936ac2cc16dd20598cda1ff04e6e966f5f917e03bb2d39b22c8af355780 |
|
MD5 | 488369784a84e8d690c2749a49af7824 |
|
BLAKE2b-256 | cb338fccd77ee1d50eb251a63cf5c7a8a404ec2722fa3d82f0406c4ef7856c9c |