Skip to content

Instantly share code, notes, and snippets.

View akutz's full-sized avatar

Andrew Kutz akutz

View GitHub Profile
package volume
// This file was generated by the swagger tool.
// Editing this file might prove futile when you re-run the swagger generate command
import (
"github.com/go-swagger/go-swagger/client"
"github.com/go-swagger/go-swagger/errors"
"github.com/go-swagger/go-swagger/strfmt"
"github.com/go-swagger/go-swagger/swag"
swagger: '2.0'
info:
title: Monorail API
description: Monorail CI core API
version: "1.1.0"
schemes:
- http
- https
basePath: /api/1.1
produces:
[0]akutz@pax:gorackhd$ make
/Users/akutz/Projects/go/bin/glide --home /Users/akutz --yaml glide-swagger.yaml up --quick --cache-gopath --use-gopath
[INFO] Downloading dependencies. Please wait...
[INFO] Fetching updates for github.com/go-swagger/go-swagger.
[INFO] Copying package github.com/go-swagger/go-swagger from the GOPATH.
[INFO] Setting version for github.com/go-swagger/go-swagger to bb86d63b17832bd6d930101040119a803c456f70.
[WARN] Skipping lockfile generation because full dependency tree is not being calculated
go run /Users/akutz/Projects/go/src/github.com/go-swagger/go-swagger/cmd/swagger/swagger.go generate client -f swagger-spec/monorail.yml
2016/03/07 17:14:23 building a plan for generation
2016/03/07 17:14:23 planning definitions
{
"id": "https://github.com/emccode/libstorage",
"$schema": "http://json-schema.org/draft-04/schema#",
"$ref": "#/definitions/volumeMap",
"definitions": {
"volume": {
"type": "object",
"properties": {
"id": {
"type": "string",
// +build run
package main
import (
"bytes"
"fmt"
"io"
"os"
"os/signal"
@akutz
akutz / task_queue.go
Created April 4, 2016 23:30
Concurrent Queue in Go
package httputils
import (
"sync"
"github.com/emccode/libstorage/api/types"
)
// NewTaskQueue returns a new types.TaskQueue.
func NewTaskQueue() types.TaskQueue {
@akutz
akutz / steps.txt
Created April 8, 2016 21:12
vbox.InstanceID
1. Login
REQUEST
POST /
<Envelope xmlns="http://schemas.xmlsoap.org/soap/envelope/"><Body xmlns="http://schemas.xmlsoap.org/soap/envelope/"><IWebsessionManager_logon xmlns="http://www.virtualbox.org/"><username>$USERNAME</username><password>$PASSWORD</password></IWebsessionManager_logon></Body></Envelope>
RESPONSE
This file has been truncated, but you can view the full file.
package vboxwebsrv
import (
"bytes"
"crypto/tls"
"encoding/xml"
"io/ioutil"
"log"
"net"
"net/http"
@akutz
akutz / libstor-c.log
Last active April 21, 2016 01:38
libStorage embedded C client & server
$ libstor-c /Users/akutz/.libstorage/config.yaml
service: mock
- volume: vol-001
name: Volume 1
iops: 0
size: 40960
type: gold
zone: zone-001
status:
[0]akutz@pax:libstorage$ go test ./drivers/storage/mock/tests -run TestVolumeRemove -v
=== RUN TestVolumeRemove
INFO[0000] configured endpoint address=tcp://127.0.0.1:38230 endpoint=localhost
INFO[0000] server created host=tcp://127.0.0.1:38230 server=scratch-fighter-kh tls=false
INFO[0000] created new service driver=mock service=mock
INFO[0000] created new service driver=mock service=mock2
INFO[0000] created new service driver=mock service=mock3
INFO[0000] initialized router len(routes)=3 router=executor-router
INFO[0000] initialized router len(routes)=1 router=root-router
INFO[0000] initialized router len(routes)=2 router=service-router