Skip to content

Instantly share code, notes, and snippets.

View dave-tucker's full-sized avatar
🦀
Slowly oxidizing

Dave Tucker dave-tucker

🦀
Slowly oxidizing
View GitHub Profile
--- a/opendaylight/northbound/connectionmanager/src/main/java/org/opendaylight/controller/connectionmanager/northbound/ConnectionManagerNorthbound.java
+++ b/opendaylight/northbound/connectionmanager/src/main/java/org/opendaylight/controller/connectionmanager/northbound/ConnectionManagerNorthbound.java
@@ -40,6 +40,7 @@ import org.opendaylight.controller.northbound.commons.utils.NorthboundUtils;
import org.opendaylight.controller.sal.authorization.Privilege;
import org.opendaylight.controller.sal.connection.ConnectionConstants;
import org.opendaylight.controller.sal.core.Node;
+import org.opendaylight.controller.sal.utils.HexEncode;
import org.opendaylight.controller.sal.utils.NetUtils;
import org.opendaylight.controller.sal.utils.ServiceHelper;
import org.opendaylight.controller.sal.utils.Status;
@dave-tucker
dave-tucker / create_vms
Created January 21, 2014 12:24
Create VMs for Devstack with ODL ML2
#!/bin/bash
. ./openrc admin admin
if ! nova keypair-list | grep "mykey"; then
nova keypair-add --pub-key ~/.ssh/id_rsa.pub mykey
fi
nova quota-update --instances 100 --cores 200 --ram 51200000 $(keystone tenant-list | grep -m1 'admin' | awk '{print $2}')
@dave-tucker
dave-tucker / delete_vms
Created January 21, 2014 12:25
Deletes all VMs from Nova
#!/bin/bash
. ./openrc admin admin
for OUTPUT in $(nova list | grep -v "Name" | awk '{ print $2}');
do
echo "Deleting VM $OUTPUT"
nova delete $OUTPUT
done
REPOSITORY TAG IMAGE ID CREATED VIRTUAL SIZE
davetucker/docker-ovs 2.1.1 633ae45159ea 4 hours ago 947.2 MB
davetucker/docker-ovs 2.1.0 4c966e54f39f 4 hours ago 947.3 MB
davetucker/docker-ovs 2.0.1 55ce9182be96 5 hours ago 908.7 MB
davetucker/docker-ovs 2.0.0 5fe6b0a222bc 5 hours ago 908.2 MB
davetucker/docker-ovs 1.11.0 fc993d46630d 5 hours ago 898.4 MB
davetucker/docker-ovs 1.10.2 e3bebb315462 5 hours ago 892.6 MB
davetucker/docker-ovs 1.10.0 e19a6019de6d 5 hours ago 892.6 MB
davetucker/docker-ovs 1.9.3 d71fa3e112f9 5 hours ago 889.8 MB
davetucker/docker-ovs 1.9.0 ca19750f222c 5 hours ago 889.7 MB
@dave-tucker
dave-tucker / build-ovs-rpms.sh
Created May 7, 2014 13:08
Build RPMs for every version of Open vSwitch
#!/bin/bash
# Copyright 2014 Red Hat, Inc.
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writing, software

#Enable ELrepo

su -c "yum -y install http://www.elrepo.org/elrepo-release-6-5.el6.elrepo.noarch.rpm"

#Install Kernel Mainline Stable

su -c "yum -y --enablerepo=elrepo-kernel find kernel-ml"

Note: 'kernel-lt' is the long term stable branch - 3.10 at time of writing

#!/bin/bash
set -e
# OVS_VERSION is passed in my Jenkins Multi-Configuration Job
echo "---> Starting OVS $OVS_VERSION"
# Assume all containers are already downloaded
CID=$(docker run -p 6640:6640 -p 6633:6633 -p 6644:6644 --privileged=true -d -i -t davetucker/docker-ovs:$OVS_VERSION /bin/supervisord -n)
@dave-tucker
dave-tucker / gist:c5dc5093b87fb3ba1e0c
Created June 11, 2014 14:40
0001-Fix-race-condition-with-creation-of-br-ex.patch
From 78aad5b5470d95f4ac4d9fe12a460bda84e59aee Mon Sep 17 00:00:00 2001
From: Dave Tucker <dave@dtucker.co.uk>
Date: Wed, 11 Jun 2014 15:27:51 +0100
Subject: [PATCH] Fix race condition with creation of br-ex
---
lib/neutron_plugins/ovs_base | 5 +++--
1 file changed, 3 insertions(+), 2 deletions(-)
diff --git a/lib/neutron_plugins/ovs_base b/lib/neutron_plugins/ovs_base
@dave-tucker
dave-tucker / vswitchd.yaml
Last active August 29, 2015 14:02
vswitchd schema
# vswitch.ovsschema
# correct to 2014-04-10
# last commit - bbe6109de720e073a4ae78910577f7747cef3bc6
---
- name: name
from_version: 1.0.0
- name: cksum
from_version: 1.0.0
- name: version
@dave-tucker
dave-tucker / flows.sh
Last active December 30, 2023 14:28
Open vSwitch Router Flows
sh ovs-vsctl set Bridge s1 "protocols=OpenFlow13"
sh ovs-ofctl add-group -OOpenFlow13 s1 group_id=1,type=all,bucket=output:1
sh ovs-ofctl add-group -OOpenFlow13 s1 group_id=2,type=all,bucket=output:2,4
sh ovs-ofctl add-group -OOpenFlow13 s1 group_id=3,type=all,bucket=output:3
sh ovs-ofctl add-flow -OOpenFlow13 s1 "table=0, priority=1000, dl_type=0x0806, actions=goto_table=105"
sh ovs-ofctl add-flow -OOpenFlow13 s1 "table=0, priority=100, dl_dst=00:00:5E:00:02:01, action=goto_table=5"
sh ovs-ofctl add-flow -OOpenFlow13 s1 "table=0, priority=100, dl_dst=00:00:5E:00:02:02, action=goto_table=5"
sh ovs-ofctl add-flow -OOpenFlow13 s1 "table=0, priority=100, dl_dst=00:00:5E:00:02:03, action=goto_table=5"
sh ovs-ofctl add-flow -OOpenFlow13 s1 "table=0, priority=0, action=goto_table=20"
sh ovs-ofctl add-flow -OOpenFlow13 s1 "table=5, priority=65535, dl_type=0x0800, nw_dst=10.10.10.0/24 actions=goto_table=10"