Coder Social home page Coder Social logo

rlockertools's Introduction

Useful tools to work with Rlocker project API

Quick Start

Normal installation

pip install rlockertools

Setup

git clone https://github.com/red-hat-storage/rlockertools.git
cd rlockertools
python -m venv venv
source venv/bin/activate
pip install ./
rlock --help

usage: rlock [-h] --server-url SERVER_URL --token TOKEN [--release] [--lock] [--resume-on-connection-error] [--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 --resume-on-connection-error Use this argument in case you don't want to break queue execution in the middle of waiting for queue status being FINISHED --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

```bash
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

rlockertools's People

Contributors

jimdevops19 avatar petr-balogh avatar odedviner avatar dahorak avatar clacroix12 avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.