Skip to content

Instantly share code, notes, and snippets.

View bot11's full-sized avatar

Ramakrishna Deepak Battu bot11

  • Sydney, Australia
View GitHub Profile
@bot11
bot11 / sshmodify.py
Created July 14, 2014 05:27
Paramiko ssh
__author__ = 'bot11'
'''
Hop on to the servers and make the passwordauthentication no
'''
import sys
import paramiko as pm
@bot11
bot11 / utelnet.py
Last active August 29, 2015 14:06
Telnet library that verifies the remote port open
class Connect:
def __init__(self, ip, port):
self.ip = ip
self.port = port
def verify(self):
import socket
import telnetlib
session = None
try:
@bot11
bot11 / usocket.py
Created September 9, 2014 12:23
Verify the remote port open
class Connect:
def __init__(self, ip, port):
self.ip = ip
self.port = port
def verify(self):
import socket
client_socket = socket.socket(socket.AF_INET, socket.SOCK_STREAM)
try:
client_socket = socket.socket(socket.AF_INET, socket.SOCK_STREAM)
__author__ = 'root'
from keystoneclient.v2_0 import client as keystoneclient
from neutronclient.neutron import client as neutronclient
import sys
kclient = keystoneclient.Client(auth_url="http://localhost:35357/v2.0/",
username="admin", tenant_name="admin",
password="devstack")
@bot11
bot11 / keystone middleware
Last active August 29, 2015 14:15
devstack errors
Error description:
-----------------
'keystone middleware' is not a global requirement but it should be,something went wrong
Solution:
--------
Update the oslo.config in all directories present at /opt/stack.
Change the requirements.txt and egg.info/requires.txt files only.
For example in cinder:
@bot11
bot11 / local.conf
Created February 11, 2015 02:58
devstack
[[local|localrc]]
HOST_IP=10.0.0.13
# Credentials
DATABASE_PASSWORD=devstack
ADMIN_PASSWORD=devstack
SERVICE_PASSWORD=devstack
SERVICE_TOKEN=devstack
RABBIT_PASSWORD=devstack
@bot11
bot11 / gist:6d800e4822340c50d4e6
Last active August 29, 2015 14:15
devstack installation
$ apt-get update
$ adduser stack
$ echo "stack ALL=(ALL) NOPASSWD: ALL" >> /etc/sudoers
$ apt-get install git
$ su stack
$ git clone -b stable/icehouse https://git.openstack.org/openstack-dev/devstack
$ cd devstack
$ vim local.conf
[[local|localrc]]
@bot11
bot11 / screen commands
Created April 16, 2015 05:08
screen commands
# list all screens
screen -ls
# Setup a shared screen
screen -d -m -S <sessionname>
#Attach to the screen using.
#Multiple users can attach to the same screen using the below command and share.
screen -x <sessionname>
#Kill a screen session
@bot11
bot11 / mybmc.emu
Created June 2, 2015 10:51
BMC.emu
# This is an example simulation setup for ipmi_sim. It creates a single
# management controller as a BMC. That will have the standard watchdog
# sensor and we add a temperature sensor.
# The BMC is the MC at address 20
mc_setbmc 0x20
# Now add the BMC
mc_add 0x20 0 no-device-sdrs 0x23 9 8 0x9f 0x1291 0xf02 persist_sdr
sel_enable 0x20 1000 0x0a
@bot11
bot11 / scp.py
Created July 14, 2014 05:26
paramiko scp
__author__ = 'bot11'
import sys, paramiko
hosts = {'host1': '192.168.1.1',
'host2': '192.168.1.2'}
port = 22
username = 'user'