This file contains hidden or 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
{% set image_name = "^cirros.*$" %} | |
{% set smoke = 0 %} | |
--- | |
NeutronNetworks.create_and_list_networks: | |
- | |
args: | |
network_create_args: | |
runner: | |
type: "constant" |
This file contains hidden or 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
export DEBIAN_FRONTEND=noninteractive | |
apt-get update | |
apt-get -y install software-properties-common | |
add-apt-repository -y cloud-archive:mitaka | |
apt-get update && apt-get -y dist-upgrade | |
apt-get -y install keystone crudini python-openstackclient | |
crudini --set /etc/keystone/keystone.conf DEFAULT admin_token openstack | |
crudini --set /etc/keystone/keystone.conf token provider fernet | |
su -s /bin/sh -c "keystone-manage db_sync" keystone | |
keystone-manage fernet_setup --keystone-user keystone --keystone-group keystone |
This file contains hidden or 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 bash | |
while getopts ":n:m:i:g:" opt; do | |
case $opt in | |
n) | |
NAMESPACE=$OPTARG | |
;; | |
m) | |
MAC=$OPTARG | |
;; |
This file contains hidden or 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 | |
midonet-cli -e "list host" > /tmp/midonet-hosts.list | |
if midonet-cli -e list tunnel-zone 2>&1 | grep tz | |
then | |
TZONE0=$(midonet-cli -e list tunnel-zone | awk '{ print $2 }') | |
else | |
TZONE0=$(midonet-cli -e "tunnel-zone create name tz type vxlan") | |
fi |
This file contains hidden or 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
# -*- mode: ruby -*- | |
# vi: set ft=ruby : | |
Vagrant.configure(2) do |config| | |
config.vm.box = "ubuntu/trusty64" | |
config.vm.provider "virtualbox" do |vb| | |
vb.memory = "2048" | |
end |
This file contains hidden or 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
for i in $(kubectl get csr | grep Pending | awk '{ print $1 }' ) ; do kubectl certificate approve $i; done |
This file contains hidden or 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 -xe | |
# This script takes as a parameter the name of the VM | |
# and creates a linked clone | |
# Ref: https://unix.stackexchange.com/a/33584 | |
# The scripts assumes that it runs from the same folder | |
# where the vm image is located and it coincides with the | |
# image name |
This file contains hidden or 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
class topN(): | |
""" Implements an efficient data structure to return the top N elements | |
It increments the elements passed as parameter | |
""" | |
def __init__(self, N=10): | |
self.list = {} | |
self.N = N | |
self.topN = [] |
This file contains hidden or 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 jnpr.junos import Device | |
from jnpr.junos.utils.config import Config | |
import sys | |
import argparse | |
def main(argv): | |
parser = argparse.ArgumentParser() | |
parser.add_argument("h", help="host IP address") | |
parser.add_argument("f", help="configuration filename") | |
parser.add_argument("user", help="username") |
This file contains hidden or 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
Zookeeper Server: zookeeper:2181 | |
Connecting to Zookeeper Server... Connected. | |
Follow | |
Becoming leader | |
2017-11-21 16:12:16 | |
Full thread dump OpenJDK 64-Bit Server VM (25.111-b14 mixed mode): | |
"BookKeeperClientWorker-3-0" #30 prio=5 os_prio=0 tid=0x000055a4f74a6800 nid=0x2a waiting on condition [0x00007f8c944a1000] | |
java.lang.Thread.State: WAITING (parking) | |
at sun.misc.Unsafe.park(Native Method) |