Skip to content

Instantly share code, notes, and snippets.

@nuthanc
nuthanc / run_failed.py
Created May 13, 2020 05:26
Run failed test cases
import requests
import re
import os
import subprocess
subprocess.run(["pip3", "install", "bs4"])
from bs4 import BeautifulSoup
#variables
# target URL to scrap
@nuthanc
nuthanc / cloudSettings
Last active January 18, 2021 15:50
VS code settings sync
{"lastUpload":"2021-01-18T15:50:31.316Z","extensionVersion":"v3.4.3"}
@nuthanc
nuthanc / contrail_test_input.yaml
Last active May 20, 2020 13:31
d2's contrail test input for mx connectivity(previous one not working)
deployment:
deployer: juju
orchestrator: openstack
provider_config:
bms:
domainsuffix: englab.juniper.net
ntpserver: 10.204.217.158
ssh_pwd: c0ntrail123
ssh_user: root
deployment:
deployer: juju
orchestrator: openstack
provider_config:
bms:
domainsuffix: englab.juniper.net
ntpserver: 10.204.217.158
ssh_pwd: c0ntrail123
ssh_user: root
@nuthanc
nuthanc / d2.md
Last active June 3, 2020 06:35
d2 deployment

Setup MAAS and Juju

sudo apt-get install software-properties-common 
sudo add-apt-repository --yes --no-update ppa:maas/2.6 
sudo apt update 
sudo apt install maas -y
dpkg-reconfigure maas-region-controller 
ssh-keygen 
maas createadmin 
@nuthanc
nuthanc / netcfg.yaml
Last active May 26, 2020 07:52
n18 netplan config
network:
version: 2
renderer: networkd
ethernets:
eno1:
dhcp4: no
addresses: [10.204.216.194/24]
gateway4: 10.204.216.254
nameservers:
@nuthanc
nuthanc / README.md
Last active May 23, 2021 09:44
RHOSP Netronome deployment

RHOSP Netronome deployment

In nodem21(which is setup as undercloud)

###Login
# To get ip
virsh list
virsh domifaddr <id or name>
ssh stack@<ip>
@nuthanc
nuthanc / .zshrc
Last active February 3, 2022 12:11
Configs for bashrc to include
# If you come from bash you might have to change your $PATH.
# export PATH=$HOME/bin:/usr/local/bin:$PATH
# Path to your oh-my-zsh installation.
export ZSH="/Users/nuthanc/.oh-my-zsh"
# Set name of the theme to load --- if set to "random", it will
# load a random theme each time oh-my-zsh is loaded, in which case,
# to know which specific one was loaded, run: echo $RANDOM_THEME
# See https://github.com/ohmyzsh/ohmyzsh/wiki/Themes
ZSH_THEME="robbyrussell"
@nuthanc
nuthanc / .bashrc
Last active August 22, 2020 14:04
Common utility bashrc #MAC #noden18 #nodea35 #PS1
alias s="source ~/.bashrc"
alias gaa="git add --all"
alias cb="code ~/.bashrc || vi ~/.bashrc"
p(){
cd $(pwd)
git add --all
git commit -m "$1"
git push origin master
}
@nuthanc
nuthanc / fix_hashsummismatch_error
Last active March 24, 2021 07:00 — forked from ThinGuy/fix_hashsummismatch_error
Fix Hash sum mismatch error in maas that can occur when a local mirror and maas apt-proxy cache get out of sync
#To fix bad hashInsert the following as after "late_commands:" in /etc/maas/preseeds/curtin_userdata
prxyfix_01_cmd: ["curtin", "in-target", "--", "sh", "-c", "/bin/echo 'Acquire::http::Pipeline-Depth 0;' > /etc/apt/apt.conf.d/99FixBadProxy"]
prxyfix_02_cmd: ["curtin", "in-target", "--", "sh", "-c", "/bin/echo 'Acquire::http::No-Cache true;' >> /etc/apt/apt.conf.d/99FixBadProxy"]
prxyfix_03_cmd: ["curtin", "in-target", "--", "sh", "-c", "/bin/echo 'Acquire::BrokenProxy true;' >> /etc/apt/apt.conf.d/99FixBadProxy"]
#Automatically insert above into /etc/maas/preseeds/curtin_userdata using sed
sudo sed -e '/late_commands:/a \ \ prxyfix_01_cmd: ["curtin", "in-target", "--", "sh", "-c", "/bin/echo '"'"'Acquire::http::Pipeline-Depth 0;'"'"' > /etc/apt/apt.conf.d/99FixBadProxy"]\n\ \ prxyfix_02_cmd: ["curtin", "in-target", "--", "sh", "-c", "/bin/echo '"'"'Acquire::http::No-Cache true;'"'"' >> /etc/apt/apt.conf.d/99FixBadProxy"]\n\ \ prxyfix_03_cmd: ["curtin", "in-target", "--", "sh", "-c", "/bin/ec