Skip to content

Instantly share code, notes, and snippets.

View yuuichi-fujioka's full-sized avatar

yuuichi fujioka yuuichi-fujioka

View GitHub Profile
@yuuichi-fujioka
yuuichi-fujioka / flow in talbe 0.sh
Last active August 29, 2015 14:15
restapi examples
curl -s -u "admin:admin" localhost:8181/restconf/config/opendaylight-inventory:nodes/node/openflow:222845516597578/table/0/
@yuuichi-fujioka
yuuichi-fujioka / install open flow controller.txt
Created February 10, 2015 02:47
Install OpenDaylight Helium
# run on the karaf terminal
# dlux(=web ui) is installed automaticaly
feature:install odl-openflowplugin-all
@yuuichi-fujioka
yuuichi-fujioka / ttyS0.conf
Last active August 29, 2015 14:14
ubuntu with serial console. ttyS0.conf is /etc/init/ttyS0.conf
start on stopped rc RUNLEVEL=[2345]
stop on runlevel [!2345]
respawn
exec /sbin/getty -L 115200 ttyS0 vt102
@yuuichi-fujioka
yuuichi-fujioka / iptables.txt
Created January 28, 2015 07:39
port forwarding with iptables in the same network segment.
*nat
:PREROUTING ACCEPT [1:60]
:INPUT ACCEPT [1:60]
:OUTPUT ACCEPT [8:635]
:POSTROUTING ACCEPT [8:635]
-A PREROUTING -p tcp --dport 10022 -d 192.168.0.100 -j DNAT --to-destination 192.168.0.142:22
-A POSTROUTING -j MASQUERADE
COMMIT
@yuuichi-fujioka
yuuichi-fujioka / force update date.sh
Created January 22, 2015 06:19
force update date using ntp
sudo service ntp stop
sudo ntpdate -s time.nist.gov
sudo service ntp start
@yuuichi-fujioka
yuuichi-fujioka / build_image.sh
Created January 20, 2015 10:40
building openstack image using diskimage-builder
ELEMENT_PATH=/path/to/my/elements
disk-image-create vm ubuntu my-elements1 my-elements2 -a amd64 -o /path/to/new/image/file
@yuuichi-fujioka
yuuichi-fujioka / OS-TRUST_trusts.json
Created January 19, 2015 06:20
keystone v3 api: trust samples
{
"trust": {
"trustor_user_id": "e27045815a9a43c0a3d265096d3692c7",
"trustee_user_id": "8fd0d068b0474400a931715618e66d5b",
"roles": [
{
"name": "_member_"
}
],
"project_id": "63010cfdcdb540aeb15ecd4f2efa1a8e",
@yuuichi-fujioka
yuuichi-fujioka / gen_hosts.py
Created January 13, 2015 00:22
generate hosts from openstack.
#!/usr/bin/env python
import os
from novaclient import client as nclient
def get_nova_client():
auth_url = os.environ['OS_AUTH_URL']
tenant = os.environ['OS_TENANT_NAME']
username = os.environ['OS_USERNAME']
password = os.environ['OS_PASSWORD']
@yuuichi-fujioka
yuuichi-fujioka / gen_inventory.py
Created January 13, 2015 00:21
generate ansible inventory from openstack.
#!/usr/bin/env python
import os
from novaclient import client as nclient
def get_nova_client():
auth_url = os.environ['OS_AUTH_URL']
tenant = os.environ['OS_TENANT_NAME']
username = os.environ['OS_USERNAME']
password = os.environ['OS_PASSWORD']
@yuuichi-fujioka
yuuichi-fujioka / capture_8080.sh
Last active September 11, 2015 10:27
packet capture with filter using tshark(wireshark).
tshark -i eth0 -w eth0.pcap -f port 8080