Move deps from _workspace/ to vendor/
godep restore pushd $GOPATH/src/github.com/appc/spec git co master popd go get go4.org/errorutil rm -rf Godeps godep save ./... git add vendor git add -f $(git ls-files --other vendor/) git co -- Godeps/LICENSES Godeps/.license_file_state Godeps/OWNERS
This commit is contained in:
3
vendor/github.com/rackspace/gophercloud/acceptance/openstack/blockstorage/v1/pkg.go
generated
vendored
Normal file
3
vendor/github.com/rackspace/gophercloud/acceptance/openstack/blockstorage/v1/pkg.go
generated
vendored
Normal file
@@ -0,0 +1,3 @@
|
||||
// The v1 package contains acceptance tests for the Openstack Cinder V1 service.
|
||||
|
||||
package v1
|
||||
3
vendor/github.com/rackspace/gophercloud/acceptance/openstack/compute/v2/pkg.go
generated
vendored
Normal file
3
vendor/github.com/rackspace/gophercloud/acceptance/openstack/compute/v2/pkg.go
generated
vendored
Normal file
@@ -0,0 +1,3 @@
|
||||
// The v2 package contains acceptance tests for the Openstack Compute V2 service.
|
||||
|
||||
package v2
|
||||
70
vendor/github.com/rackspace/gophercloud/acceptance/openstack/db/v1/common.go
generated
vendored
Normal file
70
vendor/github.com/rackspace/gophercloud/acceptance/openstack/db/v1/common.go
generated
vendored
Normal file
@@ -0,0 +1,70 @@
|
||||
// +build acceptance db
|
||||
|
||||
package v1
|
||||
|
||||
import (
|
||||
"os"
|
||||
"testing"
|
||||
|
||||
"github.com/rackspace/gophercloud"
|
||||
"github.com/rackspace/gophercloud/openstack"
|
||||
"github.com/rackspace/gophercloud/openstack/db/v1/instances"
|
||||
th "github.com/rackspace/gophercloud/testhelper"
|
||||
)
|
||||
|
||||
func newClient(t *testing.T) *gophercloud.ServiceClient {
|
||||
ao, err := openstack.AuthOptionsFromEnv()
|
||||
th.AssertNoErr(t, err)
|
||||
|
||||
client, err := openstack.AuthenticatedClient(ao)
|
||||
th.AssertNoErr(t, err)
|
||||
|
||||
c, err := openstack.NewDBV1(client, gophercloud.EndpointOpts{
|
||||
Region: os.Getenv("OS_REGION_NAME"),
|
||||
})
|
||||
th.AssertNoErr(t, err)
|
||||
|
||||
return c
|
||||
}
|
||||
|
||||
type context struct {
|
||||
test *testing.T
|
||||
client *gophercloud.ServiceClient
|
||||
instanceID string
|
||||
DBIDs []string
|
||||
users []string
|
||||
}
|
||||
|
||||
func newContext(t *testing.T) context {
|
||||
return context{
|
||||
test: t,
|
||||
client: newClient(t),
|
||||
}
|
||||
}
|
||||
|
||||
func (c context) Logf(msg string, args ...interface{}) {
|
||||
if len(args) > 0 {
|
||||
c.test.Logf(msg, args...)
|
||||
} else {
|
||||
c.test.Log(msg)
|
||||
}
|
||||
}
|
||||
|
||||
func (c context) AssertNoErr(err error) {
|
||||
th.AssertNoErr(c.test, err)
|
||||
}
|
||||
|
||||
func (c context) WaitUntilActive(id string) {
|
||||
err := gophercloud.WaitFor(60, func() (bool, error) {
|
||||
inst, err := instances.Get(c.client, id).Extract()
|
||||
if err != nil {
|
||||
return false, err
|
||||
}
|
||||
if inst.Status == "ACTIVE" {
|
||||
return true, nil
|
||||
}
|
||||
return false, nil
|
||||
})
|
||||
|
||||
c.AssertNoErr(err)
|
||||
}
|
||||
1
vendor/github.com/rackspace/gophercloud/acceptance/openstack/db/v1/pkg.go
generated
vendored
Normal file
1
vendor/github.com/rackspace/gophercloud/acceptance/openstack/db/v1/pkg.go
generated
vendored
Normal file
@@ -0,0 +1 @@
|
||||
package v1
|
||||
1
vendor/github.com/rackspace/gophercloud/acceptance/openstack/identity/v2/pkg.go
generated
vendored
Normal file
1
vendor/github.com/rackspace/gophercloud/acceptance/openstack/identity/v2/pkg.go
generated
vendored
Normal file
@@ -0,0 +1 @@
|
||||
package v2
|
||||
1
vendor/github.com/rackspace/gophercloud/acceptance/openstack/identity/v3/pkg.go
generated
vendored
Normal file
1
vendor/github.com/rackspace/gophercloud/acceptance/openstack/identity/v3/pkg.go
generated
vendored
Normal file
@@ -0,0 +1 @@
|
||||
package v3
|
||||
39
vendor/github.com/rackspace/gophercloud/acceptance/openstack/networking/v2/common.go
generated
vendored
Normal file
39
vendor/github.com/rackspace/gophercloud/acceptance/openstack/networking/v2/common.go
generated
vendored
Normal file
@@ -0,0 +1,39 @@
|
||||
package v2
|
||||
|
||||
import (
|
||||
"os"
|
||||
"testing"
|
||||
|
||||
"github.com/rackspace/gophercloud"
|
||||
"github.com/rackspace/gophercloud/openstack"
|
||||
th "github.com/rackspace/gophercloud/testhelper"
|
||||
)
|
||||
|
||||
var Client *gophercloud.ServiceClient
|
||||
|
||||
func NewClient() (*gophercloud.ServiceClient, error) {
|
||||
opts, err := openstack.AuthOptionsFromEnv()
|
||||
if err != nil {
|
||||
return nil, err
|
||||
}
|
||||
|
||||
provider, err := openstack.AuthenticatedClient(opts)
|
||||
if err != nil {
|
||||
return nil, err
|
||||
}
|
||||
|
||||
return openstack.NewNetworkV2(provider, gophercloud.EndpointOpts{
|
||||
Name: "neutron",
|
||||
Region: os.Getenv("OS_REGION_NAME"),
|
||||
})
|
||||
}
|
||||
|
||||
func Setup(t *testing.T) {
|
||||
client, err := NewClient()
|
||||
th.AssertNoErr(t, err)
|
||||
Client = client
|
||||
}
|
||||
|
||||
func Teardown() {
|
||||
Client = nil
|
||||
}
|
||||
1
vendor/github.com/rackspace/gophercloud/acceptance/openstack/networking/v2/extensions/fwaas/pkg.go
generated
vendored
Normal file
1
vendor/github.com/rackspace/gophercloud/acceptance/openstack/networking/v2/extensions/fwaas/pkg.go
generated
vendored
Normal file
@@ -0,0 +1 @@
|
||||
package fwaas
|
||||
78
vendor/github.com/rackspace/gophercloud/acceptance/openstack/networking/v2/extensions/lbaas/common.go
generated
vendored
Normal file
78
vendor/github.com/rackspace/gophercloud/acceptance/openstack/networking/v2/extensions/lbaas/common.go
generated
vendored
Normal file
@@ -0,0 +1,78 @@
|
||||
package lbaas
|
||||
|
||||
import (
|
||||
"testing"
|
||||
|
||||
base "github.com/rackspace/gophercloud/acceptance/openstack/networking/v2"
|
||||
"github.com/rackspace/gophercloud/openstack/networking/v2/extensions/lbaas/monitors"
|
||||
"github.com/rackspace/gophercloud/openstack/networking/v2/extensions/lbaas/pools"
|
||||
"github.com/rackspace/gophercloud/openstack/networking/v2/networks"
|
||||
"github.com/rackspace/gophercloud/openstack/networking/v2/subnets"
|
||||
th "github.com/rackspace/gophercloud/testhelper"
|
||||
)
|
||||
|
||||
func SetupTopology(t *testing.T) (string, string) {
|
||||
// create network
|
||||
n, err := networks.Create(base.Client, networks.CreateOpts{Name: "tmp_network"}).Extract()
|
||||
th.AssertNoErr(t, err)
|
||||
|
||||
t.Logf("Created network %s", n.ID)
|
||||
|
||||
// create subnet
|
||||
s, err := subnets.Create(base.Client, subnets.CreateOpts{
|
||||
NetworkID: n.ID,
|
||||
CIDR: "192.168.199.0/24",
|
||||
IPVersion: subnets.IPv4,
|
||||
Name: "tmp_subnet",
|
||||
}).Extract()
|
||||
th.AssertNoErr(t, err)
|
||||
|
||||
t.Logf("Created subnet %s", s.ID)
|
||||
|
||||
return n.ID, s.ID
|
||||
}
|
||||
|
||||
func DeleteTopology(t *testing.T, networkID string) {
|
||||
res := networks.Delete(base.Client, networkID)
|
||||
th.AssertNoErr(t, res.Err)
|
||||
t.Logf("Deleted network %s", networkID)
|
||||
}
|
||||
|
||||
func CreatePool(t *testing.T, subnetID string) string {
|
||||
p, err := pools.Create(base.Client, pools.CreateOpts{
|
||||
LBMethod: pools.LBMethodRoundRobin,
|
||||
Protocol: "HTTP",
|
||||
Name: "tmp_pool",
|
||||
SubnetID: subnetID,
|
||||
}).Extract()
|
||||
|
||||
th.AssertNoErr(t, err)
|
||||
|
||||
t.Logf("Created pool %s", p.ID)
|
||||
|
||||
return p.ID
|
||||
}
|
||||
|
||||
func DeletePool(t *testing.T, poolID string) {
|
||||
res := pools.Delete(base.Client, poolID)
|
||||
th.AssertNoErr(t, res.Err)
|
||||
t.Logf("Deleted pool %s", poolID)
|
||||
}
|
||||
|
||||
func CreateMonitor(t *testing.T) string {
|
||||
m, err := monitors.Create(base.Client, monitors.CreateOpts{
|
||||
Delay: 10,
|
||||
Timeout: 10,
|
||||
MaxRetries: 3,
|
||||
Type: monitors.TypeHTTP,
|
||||
ExpectedCodes: "200",
|
||||
URLPath: "/login",
|
||||
HTTPMethod: "GET",
|
||||
}).Extract()
|
||||
|
||||
th.AssertNoErr(t, err)
|
||||
|
||||
t.Logf("Created monitor ID [%s]", m.ID)
|
||||
|
||||
return m.ID
|
||||
}
|
||||
1
vendor/github.com/rackspace/gophercloud/acceptance/openstack/networking/v2/extensions/lbaas/pkg.go
generated
vendored
Normal file
1
vendor/github.com/rackspace/gophercloud/acceptance/openstack/networking/v2/extensions/lbaas/pkg.go
generated
vendored
Normal file
@@ -0,0 +1 @@
|
||||
package lbaas
|
||||
1
vendor/github.com/rackspace/gophercloud/acceptance/openstack/networking/v2/extensions/pkg.go
generated
vendored
Normal file
1
vendor/github.com/rackspace/gophercloud/acceptance/openstack/networking/v2/extensions/pkg.go
generated
vendored
Normal file
@@ -0,0 +1 @@
|
||||
package extensions
|
||||
1
vendor/github.com/rackspace/gophercloud/acceptance/openstack/networking/v2/pkg.go
generated
vendored
Normal file
1
vendor/github.com/rackspace/gophercloud/acceptance/openstack/networking/v2/pkg.go
generated
vendored
Normal file
@@ -0,0 +1 @@
|
||||
package v2
|
||||
28
vendor/github.com/rackspace/gophercloud/acceptance/openstack/objectstorage/v1/common.go
generated
vendored
Normal file
28
vendor/github.com/rackspace/gophercloud/acceptance/openstack/objectstorage/v1/common.go
generated
vendored
Normal file
@@ -0,0 +1,28 @@
|
||||
// +build acceptance
|
||||
|
||||
package v1
|
||||
|
||||
import (
|
||||
"os"
|
||||
"testing"
|
||||
|
||||
"github.com/rackspace/gophercloud"
|
||||
"github.com/rackspace/gophercloud/openstack"
|
||||
th "github.com/rackspace/gophercloud/testhelper"
|
||||
)
|
||||
|
||||
var metadata = map[string]string{"gopher": "cloud"}
|
||||
|
||||
func newClient(t *testing.T) *gophercloud.ServiceClient {
|
||||
ao, err := openstack.AuthOptionsFromEnv()
|
||||
th.AssertNoErr(t, err)
|
||||
|
||||
client, err := openstack.AuthenticatedClient(ao)
|
||||
th.AssertNoErr(t, err)
|
||||
|
||||
c, err := openstack.NewObjectStorageV1(client, gophercloud.EndpointOpts{
|
||||
Region: os.Getenv("OS_REGION_NAME"),
|
||||
})
|
||||
th.AssertNoErr(t, err)
|
||||
return c
|
||||
}
|
||||
44
vendor/github.com/rackspace/gophercloud/acceptance/openstack/orchestration/v1/common.go
generated
vendored
Normal file
44
vendor/github.com/rackspace/gophercloud/acceptance/openstack/orchestration/v1/common.go
generated
vendored
Normal file
@@ -0,0 +1,44 @@
|
||||
// +build acceptance
|
||||
|
||||
package v1
|
||||
|
||||
import (
|
||||
"fmt"
|
||||
"os"
|
||||
"testing"
|
||||
|
||||
"github.com/rackspace/gophercloud"
|
||||
"github.com/rackspace/gophercloud/openstack"
|
||||
th "github.com/rackspace/gophercloud/testhelper"
|
||||
)
|
||||
|
||||
var template = fmt.Sprintf(`
|
||||
{
|
||||
"heat_template_version": "2013-05-23",
|
||||
"description": "Simple template to test heat commands",
|
||||
"parameters": {},
|
||||
"resources": {
|
||||
"hello_world": {
|
||||
"type":"OS::Nova::Server",
|
||||
"properties": {
|
||||
"flavor": "%s",
|
||||
"image": "%s",
|
||||
"user_data": "#!/bin/bash -xv\necho \"hello world\" > /root/hello-world.txt\n"
|
||||
}
|
||||
}
|
||||
}
|
||||
}`, os.Getenv("OS_FLAVOR_ID"), os.Getenv("OS_IMAGE_ID"))
|
||||
|
||||
func newClient(t *testing.T) *gophercloud.ServiceClient {
|
||||
ao, err := openstack.AuthOptionsFromEnv()
|
||||
th.AssertNoErr(t, err)
|
||||
|
||||
client, err := openstack.AuthenticatedClient(ao)
|
||||
th.AssertNoErr(t, err)
|
||||
|
||||
c, err := openstack.NewOrchestrationV1(client, gophercloud.EndpointOpts{
|
||||
Region: os.Getenv("OS_REGION_NAME"),
|
||||
})
|
||||
th.AssertNoErr(t, err)
|
||||
return c
|
||||
}
|
||||
13
vendor/github.com/rackspace/gophercloud/acceptance/openstack/orchestration/v1/hello-compute.json
generated
vendored
Normal file
13
vendor/github.com/rackspace/gophercloud/acceptance/openstack/orchestration/v1/hello-compute.json
generated
vendored
Normal file
@@ -0,0 +1,13 @@
|
||||
{
|
||||
"heat_template_version": "2013-05-23",
|
||||
"resources": {
|
||||
"compute_instance": {
|
||||
"type": "OS::Nova::Server",
|
||||
"properties": {
|
||||
"flavor": "m1.small",
|
||||
"image": "cirros-0.3.2-x86_64-disk",
|
||||
"name": "Single Compute Instance"
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
4
vendor/github.com/rackspace/gophercloud/acceptance/openstack/pkg.go
generated
vendored
Normal file
4
vendor/github.com/rackspace/gophercloud/acceptance/openstack/pkg.go
generated
vendored
Normal file
@@ -0,0 +1,4 @@
|
||||
// +build acceptance
|
||||
|
||||
package openstack
|
||||
|
||||
Reference in New Issue
Block a user