Skip to content

Instantly share code, notes, and snippets.

@hichihara
hichihara / exec.go
Created May 31, 2018 06:10
Golang exec command unit test
package main
import (
"fmt"
"os/exec"
"strconv"
"strings"
)
var execCommand = exec.Command
package main
import (
"os/exec"
"strconv"
"strings"
)
func ssh(port int) {
cmd := exec.Command("ssh", "root@localhost", "-p", strconv.Itoa(port))
@hichihara
hichihara / vmx1.xml
Created July 25, 2017 01:43
BGP config demo with OpenConfig in Janog40
<config>
<interfaces xmlns="http://openconfig.net/yang/interfaces">
<interface>
<name>ge-0/0/0</name>
<subinterfaces>
<subinterface>
<index>0</index>
<config>
<index>0</index>
<enabled>true</enabled>
@hichihara
hichihara / local.conf
Created January 11, 2017 16:31
local.conf for lagopus
[[local|localrc]]
HOST_IP=127.0.0.1
MYSQL_PASSWORD=mysql
RABBIT_PASSWORD=rabbitmq
ADMIN_PASSWORD=secret
SERVICE_PASSWORD=secret
enable_plugin networking-lagopus https://github.com/hichihara/networking-lagopus
Q_ML2_PLUGIN_MECHANISM_DRIVERS=lagopus
diff --git a/neutron/db/models/tag.py b/neutron/db/models/tag.py
index 6fb7a36..42ef18b 100644
--- a/neutron/db/models/tag.py
+++ b/neutron/db/models/tag.py
@@ -28,3 +28,5 @@ class Tag(model_base.BASEV2):
standard_attr = orm.relationship(
'StandardAttribute',
backref=orm.backref('tags', lazy='joined', viewonly=True))
+ revises_on_change = ('resource', )
+ resource = None
@hichihara
hichihara / README.md
Last active July 29, 2016 07:52
[PoC] Set qos for VM ports to NIC

Set qos for VM ports to NIC

Precondition

  • Plugin: ML2
  • Driver: Openvswitch
  • Network: VLAN

Prepare