This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
sed 's/.*/"&\\n",/' |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
{-# LANGUAGE OverloadedStrings #-} | |
{-# LANGUAGE DeriveGeneric #-} | |
import Data.Aeson | |
import Data.Text | |
import GHC.Generics | |
import Network.Wreq | |
import Control.Lens | |
import qualified Data.ByteString.Lazy as B |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
[macvlan] | |
version = "0.1" | |
parent = "bond0.30" |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/bin/bash | |
# | |
########################################### | |
### Swarm Global Macvlan Driver Tests ### | |
### ./global-vlan-test.sh <Swarm_IP> ### | |
########################################## | |
# runswarm takes the swarm host:port and network and runs four containers on that network, then removes them | |
function runswarm { | |
echo "Creating four containers on network {$2}" |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
fredlhsu@lnx151:~$ ./docker-latest -v | |
Docker version 1.11.0-dev, build 6c2f438, experimental | |
# Here is the event stream from Swarm: | |
fredlhsu@lnx151:~$ ./docker-latest -H tcp://0.0.0.0:2376 events | |
2016-03-22T11:44:16.041037643-07:00 network create 4422a2fea7ccd0557ccbbb3651ee66399949336a6f82e49241e3386e803b9212 (name=ipv5, node.addr=172.28.168.151:2375, node.id=KUWR:KH3W:TWU6:AUK7:KONN:4KEW:D5LR:BIPL:4TFZ:O4LY:M4VH:O5UA, node.ip=172.28.168.151, node.name=lnx151, type=ipvlan) | |
2016-03-22T11:47:24.156619183-07:00 network create aa2c342501069d342e9091b9f05ad94f38624811088de4ae736fcf9301db8d1a (name=mcv1, node.addr=172.28.168.151:2375, node.id=KUWR:KH3W:TWU6:AUK7:KONN:4KEW:D5LR:BIPL:4TFZ:O4LY:M4VH:O5UA, node.ip=172.28.168.151, node.name=lnx151, type=macvlan) | |
2016-03-22T11:52:33.938128421-07:00 network create eb5f3c34dd422ce428ee1d3087ed5b0e5e8957a567086fbf8bf5f092eb43df9f (name=testbridge, node.addr=172.28.168.151:2375, node.id=KUWR:KH3W:TWU6:AUK7:KONN:4KEW:D5LR:BIPL:4TFZ:O4LY:M4VH:O5UA, node.ip=172.28.168.151, no |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# switch config | |
interface Ethernet24 | |
description r18-u34-svr2 | |
no switchport | |
ip address 192.168.1.1/24 | |
# Docker commands | |
$ docker network create -d macvlan --subnet=192.168.1.0/24 --gateway=192.168.1.1 -o host_iface=enp5s0f0 mac_net100 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# Switch config | |
vlan 20,30 | |
! | |
interface Ethernet48 | |
switchport mode trunk | |
! | |
interface Vlan20 | |
ip address 192.168.20.1/24 | |
! | |
interface Vlan30 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
[package] | |
name = "ovsdb" | |
version = "0.1.0" | |
authors = ["fredlhsu <[email protected]>"] | |
[dependencies.serde] | |
serde = "*" | |
[dependencies.serde_macros] | |
serde_macros = "*" |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
extern crate hyper; | |
extern crate core; | |
use std::io::Read; | |
use hyper::Client; | |
use hyper::header::Connection; | |
use hyper::header::Basic; | |
use hyper::header::Headers; | |
use core::str::FromStr; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
package aristalabstatus | |
import ( | |
"encoding/json" | |
"flag" | |
"fmt" | |
"github.com/fredhsu/eapigo" | |
"io/ioutil" | |
"net/http" | |
"os" |