Skip to content

Instantly share code, notes, and snippets.

View chkumar246's full-sized avatar

Chandan Kumar chkumar246

View GitHub Profile
@chkumar246
chkumar246 / cic.py
Last active September 14, 2018 14:30
#!/usr/bin/env python
# *******************************************************************************
# *
# Copyright (c) 2018 Red Hat, Inc. <http://www.redhat.com> *
# *
# This file is licensed to you under the GNU General Public License, *
# version 3 (GPLv3), as published by the Free Software Foundation *
# ------------------------------------------------------------------------------*
# *
# cic.py: This tool is very highly version dependent.It is currently *
## ToDo
## validation for app_hosts - DONE
## valid fqdn or ip -
## minmal number of hosts is 3
## can handle both space seperated and comma seperated
## Single cluster scenarios : app_hosts == avail_hosts
## Multi cluster : avail_hosts = app_hosts + other_hosts
## All hosts need to be unique
import re
@chkumar246
chkumar246 / config_tool_improvements.md
Last active January 2, 2018 17:59
Tempest config tool improvements
#!/usr/bin/env python
# Copyright 2016 Red Hat, Inc.
# All Rights Reserved.
#
# Licensed under the Apache License, Version 2.0 (the "License"); you may
# not use this file except in compliance with the License. You may obtain
# a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
@chkumar246
chkumar246 / tempest.macro
Last active November 8, 2016 17:55
Tempest Plugin entry-point separation macro
%define service manila
# Entry Point Macro
%define py2_entrypoint() \
egg_path=%{buildroot}%{python2_sitelib}/%{service}-*.egg-info \
tempest_egg_path=%{buildroot}%{python2_sitelib}/%{service}_tests.egg-info \
mkdir $tempest_egg_path \
grep "tempest\\|Tempest" %{service}.egg-info/entry_points.txt >$tempest_egg_path/entry_points.txt \
sed -i "/tempest\\|Tempest/d" $egg_path/entry_points.txt \
# echo 'Metadata-Version: 1.1\nName: %{service}-tests\nVersion: %{upstream_version}\nSummary: %{summary} Tempest Plugin\n' >> $tempest_egg_path/PKG-INFO \
%nil
@chkumar246
chkumar246 / findimports.py
Last active October 3, 2016 12:39
Script to find out all third party imports from a code repository
# Script to find all third party imports from python projects
# How to Run
# sudo pip install find-import virtualenv pymod2pkg
# python findimports.py <path to python code repository>
# Author: Chandan Kumar <chkumar246@gmail.com>
import pymod2pkg
import os
import shutil
import subprocess

What's new in Fedora 24

Topics

  • Workstation
  • Server
  • Cloud
  • Spins and Labs
# Script to generate stats based on the activity on RDO Bugzilla
# during Bug Triage Day
#
# Autho: Chandan Kumar <chkumar246@gmail.com>
#
# How to run this script
# python bztraigeday_stats.py
import bugzilla
# Bugzilla Script to close ALL EOL Bugs
# Author : Chandan Kumar <chkumar246@gmail.com>
#
# How to Run this script:
# $ python close_eol_bugs.py
import bugzilla
import getpass
BZ_URL = "https://bugzilla.redhat.com"
@chkumar246
chkumar246 / gist:cc44a12214470499830c
Created August 27, 2015 10:23
August Python Pune Meetup 2015 Schedule
August Python Pune Meetup 2015 Schedule
=======================================
Date: 29th August, 2015
Time: 10:30 A.M. to 02:30 P.M.
Venue: Amazatic Solutions, Office # 712, 713 & 716 Spot 18 Mall, Jagtap Dairy Chowk, Pimple Saudagar , Pune
[1.] Workshop : 10:30 A.M. to 11:30 A.M.
Topic - Scapy - A packet crafting/manipulation tool
speaker - suraj deshmukh
Pre-requisites: