Package: tipset
tipsetIntroductiontipset is a tool collection about various tips under linux.InstallationInstall from pip# pip install tipsetInstall from code repo directly# pip install git+https://github.com/liangxiao1/tipset.git@mainBuild wheel from source code and install it# python3 setup.py sdist bdist_wheel# pip install -U dist/tipsearch-0.0.1-py3-none-any.whlPublic new wheels onpypi(maintainer use only)# python3 -m twine upload  dist/*Enjoy itThere are 4 utils included currently(under /usr/local/bin by default).aws_resource_monitor: monitor resources on aws.json_parser: convert json to yaml or plain text.rhcert_manager: interact with rhcert web console in cli.rp_manager: interact with reportportal in cli.tipsearch: a collection of tips under linux, get to know the command usage with examples instead of looking for man page.aws_resource_monitor usage examples# query resources with specific tag$aws_resource_monitor--filters'[{"Name":"tag:Name","Values":["xiliang*"]}]'--profilexxx--regionus-west-2# query ami with specific id$aws_resource_monitor--filters'[{"Name":"image-id","Values":["ami-xxxxxx"]}]'--profilexxx--regionus-east-1--typeami# query volumes exist days over 300 and delete them$aws_resource_monitor--days300--profilexxx--regionus-west-2--typevolume--delete# query instance with specific id and delete it directly$aws_resource_monitor--filters'[{"Name":"instance-id","Values":["i-0cf52ed8ea39xxxxxx"]}]'--profilexxx--regionus-west-2--typeinstance--delete# delete resources from csv file$aws_resource_monitor--profilerhui-dev--regionus-west-2--typeami--resource/tmp/aws_images.csv--deleteFilters Ref:https://boto3.amazonaws.com/v1/documentation/api/latest/index.htmlrhcert_manager usage examples (cfg template)# init token firstly$rhcert_managertoken--init# create new product$rhcert_managerproduct--partnerIdxxx--category'Cloud Instance Type'--namexxx--makexxx--modelxxx--descriptionxxx--productUrlxxx--specUrlxxx--supportUrlxxx--new# create new cert for RHEL-8.7 x86_64 arch$rhcert_managercert--classificationId1--partnerProductIdxxx--certificationTypeId61--content'{"versionId":"2327","platformId":"7"}'--new# query the cert ticket info$rhcert_managercert--idxxx--list# upload the attachment to cert ticket$rhcert_managercert--idxxx--caseNumberxxx--attachmentxxx--attachment_desc'Auto uploaded.'--attachment_uploadrp_manager usage examples (cfg template)# create new launch by uploading test logdir$rp_managerlaunch--cfgrp_manager.yaml--new--logdirXXXX# list launch by launch uuid or id$rp_managerlaunch--cfgrp_manager.yaml--uuid<launchUUID>--list# trigger auto analyze by launch uuid$rp_managerlaunch--cfgrp_manager.yaml--uuid<launchUUID>--analyze# delete launch by launch uuid$rp_managerlaunch--cfgrp_manager.yaml--uuid<launchUUID>--delete# list current user information$rp_manageruser--listtipsearch usage examplesBelow is a simple example to search sed examples from subject.$tipsearch-ksed-fsubject
INFO:Runinmode:keywords:sedfields:subjecttipids:Nonesum_only:False
INFO:Loadingbaselinedatafilefrom/home/xiliang/p3_venv/lib/python3.6/site-packages/tipset/data/tips_data.json
INFO:---------------------------------------------------------------------------
INFO:tipid:tip_61subject:sedexamples
INFO:step:sed-i"97d;98d"/tmp/1(deleteline97,98)INFO:step:sed-n'22,30p'/tmp/2(display22~30line)INFO:step:sed-i"/foos/d"/tmp/1(findanddeletethematchline)INFO:step:sed-i'1s/^/add to new top line\n/'/tmp/1(addnewlineattop)INFO:step:sed-i's/\(^.*100.*$\)///\1/'/tmp/1(insert\\attheheadofmatchedline)INFO:step:sed-i's/^foo/#comment out as bug 1464851\n&/g'/tmp/1(addonelinebeforematched)INFO:step:sed-e's/^foo.*/report/g'/tmp/1(replaceentirelinewithother)INFO:step:sed'1!G;h;$!d'/tmp/2(reversfileline,movetoptodown)INFO:tags:bash,sed
INFO:comments:
INFO:link:
INFO:Totalfound:1The installed filesAll test files are locating in "tipset" directory.$pip3show-ftipset
Name:tipset
Version:0.0.1
Summary:tipsetisacolletionofminitools.
Home-page:https://github.com/liangxiao1/tipset
Author:XiaoLiang
Author-email:xiliang@redhat.com
License:GPLv3+
Location:/home/xiliang/p3_venv/lib/python3.6/site-packages
Requires:argparse
Required-by:Files:../../../bin/json_parser../../../bin/tipsearchtipsearch/__init__.pytipsearch/data/tips_data.jsontipsearch/tipsearch.pytipset/__init__.pytipset/data/tips_data.jsontipset/json_parser.pytipset/tipsearch.pyContributionYou are welcomed to create pull request or raise issue.