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
qwe |
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 | |
echo Adding data-port interface to netplan | |
OS_PORT_LIST=$(openstack port list -c "MAC Address" -c "Fixed IP Addresses") | |
OS_SERVER_LIST=$(openstack server list) | |
for IP in $(juju status neutron-gateway|grep "Machine State" -A2|tail -n2|awk '{print $3}') | |
do | |
IFS='' |
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
#!/usr/bin/env python3 | |
# Takes output from "ts %s" and prints hashmark / seconds_per_hash | |
# e.g. bash_command | ts %s > outfile ; ./hashmarks.py outfile | |
import sys | |
rtime = 0 | |
line_time = 0 | |
hashstring = "" |
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 | |
# wait for first juju machine to get an IP addres, and then: | |
fannet=`juju model-config fan-config | awk -F '=' '{print $2}'` | |
sudo route del -net $fannet | |
firstmachine=`juju machines|egrep -v 'Machine|lxd'|head -n1` | |
sudo route add -net $fannet gw $firstmachine |
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
#!/usr/bin/python3 | |
import urllib.request, json , os, time, keyboard | |
class bcolors: | |
HEADER = '\033[95m' | |
IN_PROGRESS = '\033[94;5m' | |
SUCCESS = '\033[92m' | |
WARNING = '\033[93m' | |
FAILED = '\033[91m' |
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 hudson.model.* | |
import hudson.node_monitors.* | |
import hudson.slaves.* | |
import java.util.concurrent.* | |
jenkins = Hudson.instance | |
import javax.mail.internet.*; | |
import javax.mail.* | |
import javax.activation.* |
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 jenkins.model.* | |
import hudson.model.* | |
def jobName = "${JOB_NAME}" | |
Jenkins.instance.getAllItems(AbstractItem.class).each { | |
job-> | |
job.builds.each { build-> | |
if (build.getResult().equals(null)) { | |
buildname = build.toString() |
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 | |
set -f; IFS=$'\n' | |
juju status --format=tabular|sed -n '1,/Machines/ p' | |
#juju status --format=tabular|sed '/\[Machines\]/q' | |
echo . | |
echo 'ID STATE VERSION PRIVATE-IP PUBLIC-IP INS-ID SERIES HARDWARE' | |
machines=$(juju status --format=tabular|grep arch) | |
for a in $machines |
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
#!/usr/bin/env python | |
import yaml | |
import argparse | |
import sys | |
parser = argparse.ArgumentParser(description="Process bundle.yaml and output without relations or options.") | |
parser.add_argument('-i', '--input', help="name of input yaml") | |
parser.add_argument('-o', '--output', help="name of output yaml") | |
parser.add_argument('-c', '--charm', help="charm url to use as replacement") |
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
jgs() { juju run --unit $1 "charms.reactive --format=yaml get_states"; } | |
jdo() { juju action fetch --wait 0 $(juju action do $1 $2 | awk '{print $5}'); } | |
jupdate() { juju run --unit $1 'hooks/update-status'; } |
NewerOlder