Skip to content

Instantly share code, notes, and snippets.

@hellt
hellt / sample.py
Created December 22, 2016 07:22
nokia_netconf_sample
# SCRIPT BODY app.py
from ncclient import manager
import logging
# logging.basicConfig(
# level=logging.DEBUG,
# )
with manager.connect(host='172.17.14.102', port=830, username='admin', password='admin',
device_params={'name': 'alu'},
/* Space out content a bit */
body {
padding-top: 20px;
padding-bottom: 20px;
}
/* Everything but the jumbotron gets side spacing for mobile first views */
.header,
.marketing,
.footer {
@hellt
hellt / nokdoc_NUAGE_4.0.R6.1.html
Created January 18, 2017 06:51
Documentation set (links) for Nuage rel. 4.0.R6.1
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="utf-8">
<meta http-equiv="X-UA-Compatible" content="IE=edge">
<meta name="viewport" content="width=device-width, initial-scale=1">
<!-- The above 3 meta tags *must* come first in the head; any other head content must come *after* these tags -->
<meta name="description" content="NokDoc">
<meta name="author" content="Roman Dodin">
<link rel="shortcut icon" href="https://cdn.rawgit.com/hellt/nokdoc/82132b04b6ff4e5281e73787a4014231c67dbdf6/template/favicon.ico">
from ncclient import manager
import logging
# logging.basicConfig(
# level=logging.DEBUG,
# )
with manager.connect(host='172.17.14.242', port=830, username='admin', password='admin',
device_params={'name': 'alu'},
hostkey_verify=False) as m:
@hellt
hellt / nuage.md
Last active August 3, 2017 11:16
Nuage NPI

Nuage Networks NPI position @ Saint-Petersburg, Russia

Goal: To provide Nuage and NFV expertise for handling of Nuage product portfolio and Network Function Virtualization related Proof-of-Concepts, demo(s), Workshops and/or Post-Sales activities

Qualifications   Your main responsibilities will include:

  • (Technical) Pre-sales, Post-Sales, engineering and professional service support for the Nuage or NFV products in EMEA region. * Capture customer requirements, define relevant Usecases and work out a corresponding list of required Nuage features & capabilities, and convert Usecase/Features into Testcases/Testplan.     
2017-08-04T08:29:52.501Z| vmx| I120: Log for VMware ESX pid=36421 version=6.0.0 build=build-3620759 option=Release
2017-08-04T08:29:52.501Z| vmx| I120: The process is 64-bit.
2017-08-04T08:29:52.501Z| vmx| I120: Host codepage=UTF-8 encoding=UTF-8
2017-08-04T08:29:52.501Z| vmx| I120: Host is VMkernel 6.0.0
2017-08-04T08:29:52.483Z| vmx| I120: VTHREAD initialize main thread 0 "vmx" pid 36421
2017-08-04T08:29:52.484Z| vmx| I120: Msg_SetLocaleEx: HostLocale=UTF-8 UserLocale=NULL
2017-08-04T08:29:52.486Z| vmx| I120: DictionaryLoad: Cannot open file "/usr/lib/vmware/config": No such file or directory.
2017-08-04T08:29:52.486Z| vmx| I120: ConfigDB: Failed to load /usr/lib/vmware/config
2017-08-04T08:29:52.486Z| vmx| I120: DictionaryLoad: Cannot open file "//.vmware/config": No such file or directory.
2017-08-04T08:29:52.487Z| vmx| I120: ConfigDB: Failed to load ~/.vmware/config
@hellt
hellt / vifmove.sh
Last active April 1, 2022 00:06
Virsh interface move
#!/bin/bash
# usage ~/vifmove.sh <virsh_domain_name/id> <interface_name> <new_bridge_name>
tmpxml=$(mktemp /tmp/ifcfg.XXX)
macaddr="$(virsh domiflist $1 | awk "/$2\s/ {print \$NF}")"
cat > "$tmpxml" <<EOF
<interface type='bridge'>
<mac address='$macaddr'/>
<source bridge='$3'/>
<model type='virtio'/>
</interface>
@hellt
hellt / wait_for_ssh.py
Last active September 18, 2023 08:21
wait_for_ssh function continuously checks whether SSH transport is ready
import paramiko
import time
def wait_for_ssh_to_be_ready(host, port, timeout, retry_interval):
client = paramiko.client.SSHClient()
client.set_missing_host_key_policy(paramiko.AutoAddPolicy())
retry_interval = float(retry_interval)
timeout = int(timeout)
timeout_start = time.time()
@hellt
hellt / main.py
Last active June 30, 2019 15:32
pycatj-web-main
import os
import sys
import json
import io
here = os.path.dirname(os.path.realpath(__file__))
sys.path.append(os.path.join(here, "vendored"))
# now it is allowed to add a non-std package
from pycatj import pycatj
@hellt
hellt / index.html
Created July 22, 2019 02:19
index.html that comes with the mdbootstrap installation
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="utf-8">
<meta name="viewport" content="width=device-width, initial-scale=1, shrink-to-fit=no">
<meta http-equiv="x-ua-compatible" content="ie=edge">
<title>Material Design Bootstrap</title>
<!-- Font Awesome -->
<link rel="stylesheet" href="https://use.fontawesome.com/releases/v5.8.2/css/all.css">