This asumes that your VM's in your libvirt network, have functioning DNS, using dnsmasq provided by libvirt and your host.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import requests, argparse, timeit | |
from concurrent.futures import ThreadPoolExecutor | |
### Globals | |
""" These are simply defined, and the values are not used. | |
The values are set by argparse at the start of the script. | |
""" | |
server = '' | |
port = 0 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
from requests.auth import AuthBase | |
class SAML(AuthBase): | |
from bs4 import BeautifulSoup | |
"""Implemeents SSO with RH auth.redhat.com""" | |
def __init__(self, username, password): | |
# setup any auth-related data here | |
self.username = username | |
self.password = password |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
sudo virt-install -n test -r 2048 --disk path=/var/lib/libvirt/images/test.img,size=25,format=qcow2,sparse=false --location="https://mirrors.rit.edu/fedora/fedora/linux/releases/27/Workstation/x86_64/os/" --initrd-inject=fedora.ks -x "ks=file:/fedora.ks" --noautoconsole |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
unset OS_SERVICE_TOKEN | |
if [[ -z $1 ]]; then | |
echo -n "Please enter your OpenStack Username: " | |
read OS_USERNAME_INPUT | |
export OS_USERNAME=$OS_USERNAME_INPUT | |
else | |
export OS_USERNAME=$1 | |
fi |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/bin/bash | |
# Description: Simple Script to Create an NSS Certificat Authority (CA), and client / server certificats that can be used for testing. | |
# Usage: Simply run the script with out options. Be sure to set the Configuration settings below | |
# Opetions: are positional | |
# 1: -i - This option activates intermediate mode, and will issue and intermediate CA certificate, clients and servers will be signed by the intermediat and not the CA. | |
# 2: -j - This option activates Java, and will issue java keystores for | |
# -- Configuration ------------------------------------------------------- | |
# Testing Varables |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
DIR=/tmp/test | |
FLAG=1 | |
mkdir -p $DIR | |
START=$(pwd) && cd $DIR | |
while read line; do | |
if [[ -z $line ]]; then | |
FLAG=1 | |
else | |
if [[ $FLAG == 0 ]]; then |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
DEBUG=TRUE | |
SAVE_FILE=/tmp/REPOS | |
REPO_DIR="$HOME/Repositories/" && cd $REPO_DIR | |
echo "Moved into Repository Directory: $(pwd)" | |
for repo in $(ls); do | |
echo "Saving: $repo" | |
cd $repo; git remote -v | grep -e push | awk '{print $2}' >> $SAVE_FILE | |
for cdir in $(ls -d */ | grep -v "\."); do | |
if [[ $DEBUG == "TRUE" ]]; then echo "Checking for SVN repos at $cdir"; fi | |
if [[ -e $cdir/.svn ]]; then |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
@app.route('/endpoint') | |
def endpoint(): | |
# Check for SSL on OpenShift, that is used to force SSL for your endpoint. | |
## You have to check for the X-Forwarded-Proto because of the OpenShift Node Router terminating the SSL. | |
if request.headers.get('X-Forwarded-Proto', 'http') != 'https': | |
return redirect(request.url.replace("http://", "https://")) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/bin/bash | |
wake(){ # Start your VM | |
sudo virsh start $1 | |
} | |
slay(){ # Stop your VM | |
sd_time=20 | |
sudo virsh shutdown $1 | |
if [[ $? ]]; then |