mirror of
https://github.com/k3s-io/kubernetes.git
synced 2025-07-27 05:27:21 +00:00
parent
d602ea69dc
commit
adaade6a22
66
Godeps/Godeps.json
generated
66
Godeps/Godeps.json
generated
@ -1454,123 +1454,123 @@
|
|||||||
},
|
},
|
||||||
{
|
{
|
||||||
"ImportPath": "github.com/gophercloud/gophercloud",
|
"ImportPath": "github.com/gophercloud/gophercloud",
|
||||||
"Rev": "b06120d13e262ceaf890ef38ee30898813696af0"
|
"Rev": "ce1e02c3ccfdb7fab257340dc4d603ec3035fa11"
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
"ImportPath": "github.com/gophercloud/gophercloud/openstack",
|
"ImportPath": "github.com/gophercloud/gophercloud/openstack",
|
||||||
"Rev": "b06120d13e262ceaf890ef38ee30898813696af0"
|
"Rev": "ce1e02c3ccfdb7fab257340dc4d603ec3035fa11"
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
"ImportPath": "github.com/gophercloud/gophercloud/openstack/blockstorage/v1/apiversions",
|
"ImportPath": "github.com/gophercloud/gophercloud/openstack/blockstorage/v1/apiversions",
|
||||||
"Rev": "b06120d13e262ceaf890ef38ee30898813696af0"
|
"Rev": "ce1e02c3ccfdb7fab257340dc4d603ec3035fa11"
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
"ImportPath": "github.com/gophercloud/gophercloud/openstack/blockstorage/v1/volumes",
|
"ImportPath": "github.com/gophercloud/gophercloud/openstack/blockstorage/v1/volumes",
|
||||||
"Rev": "b06120d13e262ceaf890ef38ee30898813696af0"
|
"Rev": "ce1e02c3ccfdb7fab257340dc4d603ec3035fa11"
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
"ImportPath": "github.com/gophercloud/gophercloud/openstack/blockstorage/v2/volumes",
|
"ImportPath": "github.com/gophercloud/gophercloud/openstack/blockstorage/v2/volumes",
|
||||||
"Rev": "b06120d13e262ceaf890ef38ee30898813696af0"
|
"Rev": "ce1e02c3ccfdb7fab257340dc4d603ec3035fa11"
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
"ImportPath": "github.com/gophercloud/gophercloud/openstack/common/extensions",
|
"ImportPath": "github.com/gophercloud/gophercloud/openstack/common/extensions",
|
||||||
"Rev": "b06120d13e262ceaf890ef38ee30898813696af0"
|
"Rev": "ce1e02c3ccfdb7fab257340dc4d603ec3035fa11"
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
"ImportPath": "github.com/gophercloud/gophercloud/openstack/compute/v2/extensions/volumeattach",
|
"ImportPath": "github.com/gophercloud/gophercloud/openstack/compute/v2/extensions/volumeattach",
|
||||||
"Rev": "b06120d13e262ceaf890ef38ee30898813696af0"
|
"Rev": "ce1e02c3ccfdb7fab257340dc4d603ec3035fa11"
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
"ImportPath": "github.com/gophercloud/gophercloud/openstack/compute/v2/flavors",
|
"ImportPath": "github.com/gophercloud/gophercloud/openstack/compute/v2/flavors",
|
||||||
"Rev": "b06120d13e262ceaf890ef38ee30898813696af0"
|
"Rev": "ce1e02c3ccfdb7fab257340dc4d603ec3035fa11"
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
"ImportPath": "github.com/gophercloud/gophercloud/openstack/compute/v2/images",
|
"ImportPath": "github.com/gophercloud/gophercloud/openstack/compute/v2/images",
|
||||||
"Rev": "b06120d13e262ceaf890ef38ee30898813696af0"
|
"Rev": "ce1e02c3ccfdb7fab257340dc4d603ec3035fa11"
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
"ImportPath": "github.com/gophercloud/gophercloud/openstack/compute/v2/servers",
|
"ImportPath": "github.com/gophercloud/gophercloud/openstack/compute/v2/servers",
|
||||||
"Rev": "b06120d13e262ceaf890ef38ee30898813696af0"
|
"Rev": "ce1e02c3ccfdb7fab257340dc4d603ec3035fa11"
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
"ImportPath": "github.com/gophercloud/gophercloud/openstack/identity/v2/tenants",
|
"ImportPath": "github.com/gophercloud/gophercloud/openstack/identity/v2/tenants",
|
||||||
"Rev": "b06120d13e262ceaf890ef38ee30898813696af0"
|
"Rev": "ce1e02c3ccfdb7fab257340dc4d603ec3035fa11"
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
"ImportPath": "github.com/gophercloud/gophercloud/openstack/identity/v2/tokens",
|
"ImportPath": "github.com/gophercloud/gophercloud/openstack/identity/v2/tokens",
|
||||||
"Rev": "b06120d13e262ceaf890ef38ee30898813696af0"
|
"Rev": "ce1e02c3ccfdb7fab257340dc4d603ec3035fa11"
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
"ImportPath": "github.com/gophercloud/gophercloud/openstack/identity/v3/extensions/trusts",
|
"ImportPath": "github.com/gophercloud/gophercloud/openstack/identity/v3/extensions/trusts",
|
||||||
"Rev": "b06120d13e262ceaf890ef38ee30898813696af0"
|
"Rev": "ce1e02c3ccfdb7fab257340dc4d603ec3035fa11"
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
"ImportPath": "github.com/gophercloud/gophercloud/openstack/identity/v3/tokens",
|
"ImportPath": "github.com/gophercloud/gophercloud/openstack/identity/v3/tokens",
|
||||||
"Rev": "b06120d13e262ceaf890ef38ee30898813696af0"
|
"Rev": "ce1e02c3ccfdb7fab257340dc4d603ec3035fa11"
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
"ImportPath": "github.com/gophercloud/gophercloud/openstack/networking/v2/extensions",
|
"ImportPath": "github.com/gophercloud/gophercloud/openstack/networking/v2/extensions",
|
||||||
"Rev": "b06120d13e262ceaf890ef38ee30898813696af0"
|
"Rev": "ce1e02c3ccfdb7fab257340dc4d603ec3035fa11"
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
"ImportPath": "github.com/gophercloud/gophercloud/openstack/networking/v2/extensions/layer3/floatingips",
|
"ImportPath": "github.com/gophercloud/gophercloud/openstack/networking/v2/extensions/layer3/floatingips",
|
||||||
"Rev": "b06120d13e262ceaf890ef38ee30898813696af0"
|
"Rev": "ce1e02c3ccfdb7fab257340dc4d603ec3035fa11"
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
"ImportPath": "github.com/gophercloud/gophercloud/openstack/networking/v2/extensions/layer3/routers",
|
"ImportPath": "github.com/gophercloud/gophercloud/openstack/networking/v2/extensions/layer3/routers",
|
||||||
"Rev": "b06120d13e262ceaf890ef38ee30898813696af0"
|
"Rev": "ce1e02c3ccfdb7fab257340dc4d603ec3035fa11"
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
"ImportPath": "github.com/gophercloud/gophercloud/openstack/networking/v2/extensions/lbaas/members",
|
"ImportPath": "github.com/gophercloud/gophercloud/openstack/networking/v2/extensions/lbaas/members",
|
||||||
"Rev": "b06120d13e262ceaf890ef38ee30898813696af0"
|
"Rev": "ce1e02c3ccfdb7fab257340dc4d603ec3035fa11"
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
"ImportPath": "github.com/gophercloud/gophercloud/openstack/networking/v2/extensions/lbaas/monitors",
|
"ImportPath": "github.com/gophercloud/gophercloud/openstack/networking/v2/extensions/lbaas/monitors",
|
||||||
"Rev": "b06120d13e262ceaf890ef38ee30898813696af0"
|
"Rev": "ce1e02c3ccfdb7fab257340dc4d603ec3035fa11"
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
"ImportPath": "github.com/gophercloud/gophercloud/openstack/networking/v2/extensions/lbaas/pools",
|
"ImportPath": "github.com/gophercloud/gophercloud/openstack/networking/v2/extensions/lbaas/pools",
|
||||||
"Rev": "b06120d13e262ceaf890ef38ee30898813696af0"
|
"Rev": "ce1e02c3ccfdb7fab257340dc4d603ec3035fa11"
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
"ImportPath": "github.com/gophercloud/gophercloud/openstack/networking/v2/extensions/lbaas/vips",
|
"ImportPath": "github.com/gophercloud/gophercloud/openstack/networking/v2/extensions/lbaas/vips",
|
||||||
"Rev": "b06120d13e262ceaf890ef38ee30898813696af0"
|
"Rev": "ce1e02c3ccfdb7fab257340dc4d603ec3035fa11"
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
"ImportPath": "github.com/gophercloud/gophercloud/openstack/networking/v2/extensions/lbaas_v2/listeners",
|
"ImportPath": "github.com/gophercloud/gophercloud/openstack/networking/v2/extensions/lbaas_v2/listeners",
|
||||||
"Rev": "b06120d13e262ceaf890ef38ee30898813696af0"
|
"Rev": "ce1e02c3ccfdb7fab257340dc4d603ec3035fa11"
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
"ImportPath": "github.com/gophercloud/gophercloud/openstack/networking/v2/extensions/lbaas_v2/loadbalancers",
|
"ImportPath": "github.com/gophercloud/gophercloud/openstack/networking/v2/extensions/lbaas_v2/loadbalancers",
|
||||||
"Rev": "b06120d13e262ceaf890ef38ee30898813696af0"
|
"Rev": "ce1e02c3ccfdb7fab257340dc4d603ec3035fa11"
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
"ImportPath": "github.com/gophercloud/gophercloud/openstack/networking/v2/extensions/lbaas_v2/monitors",
|
"ImportPath": "github.com/gophercloud/gophercloud/openstack/networking/v2/extensions/lbaas_v2/monitors",
|
||||||
"Rev": "b06120d13e262ceaf890ef38ee30898813696af0"
|
"Rev": "ce1e02c3ccfdb7fab257340dc4d603ec3035fa11"
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
"ImportPath": "github.com/gophercloud/gophercloud/openstack/networking/v2/extensions/lbaas_v2/pools",
|
"ImportPath": "github.com/gophercloud/gophercloud/openstack/networking/v2/extensions/lbaas_v2/pools",
|
||||||
"Rev": "b06120d13e262ceaf890ef38ee30898813696af0"
|
"Rev": "ce1e02c3ccfdb7fab257340dc4d603ec3035fa11"
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
"ImportPath": "github.com/gophercloud/gophercloud/openstack/networking/v2/extensions/security/groups",
|
"ImportPath": "github.com/gophercloud/gophercloud/openstack/networking/v2/extensions/security/groups",
|
||||||
"Rev": "b06120d13e262ceaf890ef38ee30898813696af0"
|
"Rev": "ce1e02c3ccfdb7fab257340dc4d603ec3035fa11"
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
"ImportPath": "github.com/gophercloud/gophercloud/openstack/networking/v2/extensions/security/rules",
|
"ImportPath": "github.com/gophercloud/gophercloud/openstack/networking/v2/extensions/security/rules",
|
||||||
"Rev": "b06120d13e262ceaf890ef38ee30898813696af0"
|
"Rev": "ce1e02c3ccfdb7fab257340dc4d603ec3035fa11"
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
"ImportPath": "github.com/gophercloud/gophercloud/openstack/networking/v2/ports",
|
"ImportPath": "github.com/gophercloud/gophercloud/openstack/networking/v2/ports",
|
||||||
"Rev": "b06120d13e262ceaf890ef38ee30898813696af0"
|
"Rev": "ce1e02c3ccfdb7fab257340dc4d603ec3035fa11"
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
"ImportPath": "github.com/gophercloud/gophercloud/openstack/utils",
|
"ImportPath": "github.com/gophercloud/gophercloud/openstack/utils",
|
||||||
"Rev": "b06120d13e262ceaf890ef38ee30898813696af0"
|
"Rev": "ce1e02c3ccfdb7fab257340dc4d603ec3035fa11"
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
"ImportPath": "github.com/gophercloud/gophercloud/pagination",
|
"ImportPath": "github.com/gophercloud/gophercloud/pagination",
|
||||||
"Rev": "b06120d13e262ceaf890ef38ee30898813696af0"
|
"Rev": "ce1e02c3ccfdb7fab257340dc4d603ec3035fa11"
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
"ImportPath": "github.com/gorilla/context",
|
"ImportPath": "github.com/gorilla/context",
|
||||||
@ -1655,17 +1655,17 @@
|
|||||||
},
|
},
|
||||||
{
|
{
|
||||||
"ImportPath": "github.com/heketi/heketi/client/api/go-client",
|
"ImportPath": "github.com/heketi/heketi/client/api/go-client",
|
||||||
"Comment": "2017-03-08T23:29:50Z",
|
"Comment": "v4.0.0-22-g7a54b6f",
|
||||||
"Rev": "7a54b6fc903feab1e7cb6573177ca09b544eb1e2"
|
"Rev": "7a54b6fc903feab1e7cb6573177ca09b544eb1e2"
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
"ImportPath": "github.com/heketi/heketi/pkg/glusterfs/api",
|
"ImportPath": "github.com/heketi/heketi/pkg/glusterfs/api",
|
||||||
"Comment": "2017-03-08T23:29:50Z",
|
"Comment": "v4.0.0-22-g7a54b6f",
|
||||||
"Rev": "7a54b6fc903feab1e7cb6573177ca09b544eb1e2"
|
"Rev": "7a54b6fc903feab1e7cb6573177ca09b544eb1e2"
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
"ImportPath": "github.com/heketi/heketi/pkg/utils",
|
"ImportPath": "github.com/heketi/heketi/pkg/utils",
|
||||||
"Comment": "2017-03-08T23:29:50Z",
|
"Comment": "v4.0.0-22-g7a54b6f",
|
||||||
"Rev": "7a54b6fc903feab1e7cb6573177ca09b544eb1e2"
|
"Rev": "7a54b6fc903feab1e7cb6573177ca09b544eb1e2"
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
|
5
vendor/github.com/emicklei/go-restful-swagger12/BUILD
generated
vendored
5
vendor/github.com/emicklei/go-restful-swagger12/BUILD
generated
vendored
@ -37,9 +37,6 @@ filegroup(
|
|||||||
|
|
||||||
filegroup(
|
filegroup(
|
||||||
name = "all-srcs",
|
name = "all-srcs",
|
||||||
srcs = [
|
srcs = [":package-srcs"],
|
||||||
":package-srcs",
|
|
||||||
"//vendor/github.com/emicklei/go-restful-swagger12/test_package:all-srcs",
|
|
||||||
],
|
|
||||||
tags = ["automanaged"],
|
tags = ["automanaged"],
|
||||||
)
|
)
|
||||||
|
16
vendor/github.com/emicklei/go-restful-swagger12/test_package/BUILD
generated
vendored
16
vendor/github.com/emicklei/go-restful-swagger12/test_package/BUILD
generated
vendored
@ -1,16 +0,0 @@
|
|||||||
package(default_visibility = ["//visibility:public"])
|
|
||||||
|
|
||||||
licenses(["notice"])
|
|
||||||
|
|
||||||
filegroup(
|
|
||||||
name = "package-srcs",
|
|
||||||
srcs = glob(["**"]),
|
|
||||||
tags = ["automanaged"],
|
|
||||||
visibility = ["//visibility:private"],
|
|
||||||
)
|
|
||||||
|
|
||||||
filegroup(
|
|
||||||
name = "all-srcs",
|
|
||||||
srcs = [":package-srcs"],
|
|
||||||
tags = ["automanaged"],
|
|
||||||
)
|
|
2
vendor/github.com/gophercloud/gophercloud/README.md
generated
vendored
2
vendor/github.com/gophercloud/gophercloud/README.md
generated
vendored
@ -74,7 +74,7 @@ import (
|
|||||||
|
|
||||||
// Option 1: Pass in the values yourself
|
// Option 1: Pass in the values yourself
|
||||||
opts := gophercloud.AuthOptions{
|
opts := gophercloud.AuthOptions{
|
||||||
IdentityEndpoint: "https://my-openstack.com:5000/v2.0",
|
IdentityEndpoint: "https://openstack.example.com:5000/v2.0",
|
||||||
Username: "{username}",
|
Username: "{username}",
|
||||||
Password: "{password}",
|
Password: "{password}",
|
||||||
}
|
}
|
||||||
|
20
vendor/github.com/gophercloud/gophercloud/auth_options.go
generated
vendored
20
vendor/github.com/gophercloud/gophercloud/auth_options.go
generated
vendored
@ -1,7 +1,7 @@
|
|||||||
package gophercloud
|
package gophercloud
|
||||||
|
|
||||||
/*
|
/*
|
||||||
AuthOptions stores information needed to authenticate to an OpenStack cluster.
|
AuthOptions stores information needed to authenticate to an OpenStack Cloud.
|
||||||
You can populate one manually, or use a provider's AuthOptionsFromEnv() function
|
You can populate one manually, or use a provider's AuthOptionsFromEnv() function
|
||||||
to read relevant information from the standard environment variables. Pass one
|
to read relevant information from the standard environment variables. Pass one
|
||||||
to a provider's AuthenticatedClient function to authenticate and obtain a
|
to a provider's AuthenticatedClient function to authenticate and obtain a
|
||||||
@ -31,9 +31,16 @@ type AuthOptions struct {
|
|||||||
DomainName string `json:"name,omitempty"`
|
DomainName string `json:"name,omitempty"`
|
||||||
|
|
||||||
// The TenantID and TenantName fields are optional for the Identity V2 API.
|
// The TenantID and TenantName fields are optional for the Identity V2 API.
|
||||||
|
// The same fields are known as project_id and project_name in the Identity
|
||||||
|
// V3 API, but are collected as TenantID and TenantName here in both cases.
|
||||||
// Some providers allow you to specify a TenantName instead of the TenantId.
|
// Some providers allow you to specify a TenantName instead of the TenantId.
|
||||||
// Some require both. Your provider's authentication policies will determine
|
// Some require both. Your provider's authentication policies will determine
|
||||||
// how these fields influence authentication.
|
// how these fields influence authentication.
|
||||||
|
// If DomainID or DomainName are provided, they will also apply to TenantName.
|
||||||
|
// It is not currently possible to authenticate with Username and a Domain
|
||||||
|
// and scope to a Project in a different Domain by using TenantName. To
|
||||||
|
// accomplish that, the ProjectID will need to be provided to the TenantID
|
||||||
|
// option.
|
||||||
TenantID string `json:"tenantId,omitempty"`
|
TenantID string `json:"tenantId,omitempty"`
|
||||||
TenantName string `json:"tenantName,omitempty"`
|
TenantName string `json:"tenantName,omitempty"`
|
||||||
|
|
||||||
@ -132,14 +139,6 @@ func (opts *AuthOptions) ToTokenV3CreateMap(scope map[string]interface{}) (map[s
|
|||||||
// if insufficient or incompatible information is present.
|
// if insufficient or incompatible information is present.
|
||||||
var req request
|
var req request
|
||||||
|
|
||||||
// Test first for unrecognized arguments.
|
|
||||||
if opts.TenantID != "" {
|
|
||||||
return nil, ErrTenantIDProvided{}
|
|
||||||
}
|
|
||||||
if opts.TenantName != "" {
|
|
||||||
return nil, ErrTenantNameProvided{}
|
|
||||||
}
|
|
||||||
|
|
||||||
if opts.Password == "" {
|
if opts.Password == "" {
|
||||||
if opts.TokenID != "" {
|
if opts.TokenID != "" {
|
||||||
// Because we aren't using password authentication, it's an error to also provide any of the user-based authentication
|
// Because we aren't using password authentication, it's an error to also provide any of the user-based authentication
|
||||||
@ -252,15 +251,12 @@ func (opts *AuthOptions) ToTokenV3ScopeMap() (map[string]interface{}, error) {
|
|||||||
|
|
||||||
if opts.TenantID != "" {
|
if opts.TenantID != "" {
|
||||||
scope.ProjectID = opts.TenantID
|
scope.ProjectID = opts.TenantID
|
||||||
opts.TenantID = ""
|
|
||||||
opts.TenantName = ""
|
|
||||||
} else {
|
} else {
|
||||||
if opts.TenantName != "" {
|
if opts.TenantName != "" {
|
||||||
scope.ProjectName = opts.TenantName
|
scope.ProjectName = opts.TenantName
|
||||||
scope.DomainID = opts.DomainID
|
scope.DomainID = opts.DomainID
|
||||||
scope.DomainName = opts.DomainName
|
scope.DomainName = opts.DomainName
|
||||||
}
|
}
|
||||||
opts.TenantName = ""
|
|
||||||
}
|
}
|
||||||
|
|
||||||
if scope.ProjectName != "" {
|
if scope.ProjectName != "" {
|
||||||
|
8
vendor/github.com/gophercloud/gophercloud/doc.go
generated
vendored
8
vendor/github.com/gophercloud/gophercloud/doc.go
generated
vendored
@ -4,11 +4,13 @@ clouds. The library has a three-level hierarchy: providers, services, and
|
|||||||
resources.
|
resources.
|
||||||
|
|
||||||
Provider structs represent the service providers that offer and manage a
|
Provider structs represent the service providers that offer and manage a
|
||||||
collection of services. Examples of providers include: OpenStack, Rackspace,
|
collection of services. The IdentityEndpoint is typically refered to as
|
||||||
HP. These are defined like so:
|
"auth_url" in information provided by the cloud operator. Additionally,
|
||||||
|
the cloud may refer to TenantID or TenantName as project_id and project_name.
|
||||||
|
These are defined like so:
|
||||||
|
|
||||||
opts := gophercloud.AuthOptions{
|
opts := gophercloud.AuthOptions{
|
||||||
IdentityEndpoint: "https://my-openstack.com:5000/v2.0",
|
IdentityEndpoint: "https://openstack.example.com:5000/v2.0",
|
||||||
Username: "{username}",
|
Username: "{username}",
|
||||||
Password: "{password}",
|
Password: "{password}",
|
||||||
TenantID: "{tenant_id}",
|
TenantID: "{tenant_id}",
|
||||||
|
@ -1,8 +1,8 @@
|
|||||||
package apiversions
|
package apiversions
|
||||||
|
|
||||||
import (
|
import (
|
||||||
"strings"
|
|
||||||
"net/url"
|
"net/url"
|
||||||
|
"strings"
|
||||||
|
|
||||||
"github.com/gophercloud/gophercloud"
|
"github.com/gophercloud/gophercloud"
|
||||||
)
|
)
|
||||||
|
13
vendor/github.com/gophercloud/gophercloud/openstack/client.go
generated
vendored
13
vendor/github.com/gophercloud/gophercloud/openstack/client.go
generated
vendored
@ -310,6 +310,19 @@ func NewDBV1(client *gophercloud.ProviderClient, eo gophercloud.EndpointOpts) (*
|
|||||||
return &gophercloud.ServiceClient{ProviderClient: client, Endpoint: url}, nil
|
return &gophercloud.ServiceClient{ProviderClient: client, Endpoint: url}, nil
|
||||||
}
|
}
|
||||||
|
|
||||||
|
// NewDNSV2 creates a ServiceClient that may be used to access the v2 DNS service.
|
||||||
|
func NewDNSV2(client *gophercloud.ProviderClient, eo gophercloud.EndpointOpts) (*gophercloud.ServiceClient, error) {
|
||||||
|
eo.ApplyDefaults("dns")
|
||||||
|
url, err := client.EndpointLocator(eo)
|
||||||
|
if err != nil {
|
||||||
|
return nil, err
|
||||||
|
}
|
||||||
|
return &gophercloud.ServiceClient{
|
||||||
|
ProviderClient: client,
|
||||||
|
Endpoint: url,
|
||||||
|
ResourceBase: url + "v2/"}, nil
|
||||||
|
}
|
||||||
|
|
||||||
// NewImageServiceV2 creates a ServiceClient that may be used to access the v2 image service.
|
// NewImageServiceV2 creates a ServiceClient that may be used to access the v2 image service.
|
||||||
func NewImageServiceV2(client *gophercloud.ProviderClient, eo gophercloud.EndpointOpts) (*gophercloud.ServiceClient, error) {
|
func NewImageServiceV2(client *gophercloud.ProviderClient, eo gophercloud.EndpointOpts) (*gophercloud.ServiceClient, error) {
|
||||||
eo.ApplyDefaults("image")
|
eo.ApplyDefaults("image")
|
||||||
|
41
vendor/github.com/gophercloud/gophercloud/openstack/compute/v2/flavors/requests.go
generated
vendored
41
vendor/github.com/gophercloud/gophercloud/openstack/compute/v2/flavors/requests.go
generated
vendored
@ -54,6 +54,47 @@ func ListDetail(client *gophercloud.ServiceClient, opts ListOptsBuilder) paginat
|
|||||||
})
|
})
|
||||||
}
|
}
|
||||||
|
|
||||||
|
type CreateOptsBuilder interface {
|
||||||
|
ToFlavorCreateMap() (map[string]interface{}, error)
|
||||||
|
}
|
||||||
|
|
||||||
|
// CreateOpts is passed to Create to create a flavor
|
||||||
|
// Source:
|
||||||
|
// https://github.com/openstack/nova/blob/stable/newton/nova/api/openstack/compute/schemas/flavor_manage.py#L20
|
||||||
|
type CreateOpts struct {
|
||||||
|
Name string `json:"name" required:"true"`
|
||||||
|
// memory size, in MBs
|
||||||
|
RAM int `json:"ram" required:"true"`
|
||||||
|
VCPUs int `json:"vcpus" required:"true"`
|
||||||
|
// disk size, in GBs
|
||||||
|
Disk *int `json:"disk" required:"true"`
|
||||||
|
ID string `json:"id,omitempty"`
|
||||||
|
// non-zero, positive
|
||||||
|
Swap *int `json:"swap,omitempty"`
|
||||||
|
RxTxFactor float64 `json:"rxtx_factor,omitempty"`
|
||||||
|
IsPublic *bool `json:"os-flavor-access:is_public,omitempty"`
|
||||||
|
// ephemeral disk size, in GBs, non-zero, positive
|
||||||
|
Ephemeral *int `json:"OS-FLV-EXT-DATA:ephemeral,omitempty"`
|
||||||
|
}
|
||||||
|
|
||||||
|
// ToFlavorCreateMap satisfies the CreateOptsBuilder interface
|
||||||
|
func (opts *CreateOpts) ToFlavorCreateMap() (map[string]interface{}, error) {
|
||||||
|
return gophercloud.BuildRequestBody(opts, "flavor")
|
||||||
|
}
|
||||||
|
|
||||||
|
// Create a flavor
|
||||||
|
func Create(client *gophercloud.ServiceClient, opts CreateOptsBuilder) (r CreateResult) {
|
||||||
|
b, err := opts.ToFlavorCreateMap()
|
||||||
|
if err != nil {
|
||||||
|
r.Err = err
|
||||||
|
return
|
||||||
|
}
|
||||||
|
_, r.Err = client.Post(createURL(client), b, &r.Body, &gophercloud.RequestOpts{
|
||||||
|
OkCodes: []int{200, 201},
|
||||||
|
})
|
||||||
|
return
|
||||||
|
}
|
||||||
|
|
||||||
// Get instructs OpenStack to provide details on a single flavor, identified by its ID.
|
// Get instructs OpenStack to provide details on a single flavor, identified by its ID.
|
||||||
// Use ExtractFlavor to convert its result into a Flavor.
|
// Use ExtractFlavor to convert its result into a Flavor.
|
||||||
func Get(client *gophercloud.ServiceClient, id string) (r GetResult) {
|
func Get(client *gophercloud.ServiceClient, id string) (r GetResult) {
|
||||||
|
45
vendor/github.com/gophercloud/gophercloud/openstack/compute/v2/flavors/results.go
generated
vendored
45
vendor/github.com/gophercloud/gophercloud/openstack/compute/v2/flavors/results.go
generated
vendored
@ -8,13 +8,21 @@ import (
|
|||||||
"github.com/gophercloud/gophercloud/pagination"
|
"github.com/gophercloud/gophercloud/pagination"
|
||||||
)
|
)
|
||||||
|
|
||||||
// GetResult temporarily holds the response from a Get call.
|
type commonResult struct {
|
||||||
type GetResult struct {
|
|
||||||
gophercloud.Result
|
gophercloud.Result
|
||||||
}
|
}
|
||||||
|
|
||||||
// Extract provides access to the individual Flavor returned by the Get function.
|
type CreateResult struct {
|
||||||
func (r GetResult) Extract() (*Flavor, error) {
|
commonResult
|
||||||
|
}
|
||||||
|
|
||||||
|
// GetResult temporarily holds the response from a Get call.
|
||||||
|
type GetResult struct {
|
||||||
|
commonResult
|
||||||
|
}
|
||||||
|
|
||||||
|
// Extract provides access to the individual Flavor returned by the Get and Create functions.
|
||||||
|
func (r commonResult) Extract() (*Flavor, error) {
|
||||||
var s struct {
|
var s struct {
|
||||||
Flavor *Flavor `json:"flavor"`
|
Flavor *Flavor `json:"flavor"`
|
||||||
}
|
}
|
||||||
@ -40,41 +48,32 @@ type Flavor struct {
|
|||||||
VCPUs int `json:"vcpus"`
|
VCPUs int `json:"vcpus"`
|
||||||
}
|
}
|
||||||
|
|
||||||
func (f *Flavor) UnmarshalJSON(b []byte) error {
|
func (r *Flavor) UnmarshalJSON(b []byte) error {
|
||||||
var flavor struct {
|
type tmp Flavor
|
||||||
ID string `json:"id"`
|
var s struct {
|
||||||
Disk int `json:"disk"`
|
tmp
|
||||||
RAM int `json:"ram"`
|
|
||||||
Name string `json:"name"`
|
|
||||||
RxTxFactor float64 `json:"rxtx_factor"`
|
|
||||||
Swap interface{} `json:"swap"`
|
Swap interface{} `json:"swap"`
|
||||||
VCPUs int `json:"vcpus"`
|
|
||||||
}
|
}
|
||||||
err := json.Unmarshal(b, &flavor)
|
err := json.Unmarshal(b, &s)
|
||||||
if err != nil {
|
if err != nil {
|
||||||
return err
|
return err
|
||||||
}
|
}
|
||||||
|
|
||||||
f.ID = flavor.ID
|
*r = Flavor(s.tmp)
|
||||||
f.Disk = flavor.Disk
|
|
||||||
f.RAM = flavor.RAM
|
|
||||||
f.Name = flavor.Name
|
|
||||||
f.RxTxFactor = flavor.RxTxFactor
|
|
||||||
f.VCPUs = flavor.VCPUs
|
|
||||||
|
|
||||||
switch t := flavor.Swap.(type) {
|
switch t := s.Swap.(type) {
|
||||||
case float64:
|
case float64:
|
||||||
f.Swap = int(t)
|
r.Swap = int(t)
|
||||||
case string:
|
case string:
|
||||||
switch t {
|
switch t {
|
||||||
case "":
|
case "":
|
||||||
f.Swap = 0
|
r.Swap = 0
|
||||||
default:
|
default:
|
||||||
swap, err := strconv.ParseFloat(t, 64)
|
swap, err := strconv.ParseFloat(t, 64)
|
||||||
if err != nil {
|
if err != nil {
|
||||||
return err
|
return err
|
||||||
}
|
}
|
||||||
f.Swap = int(swap)
|
r.Swap = int(swap)
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
4
vendor/github.com/gophercloud/gophercloud/openstack/compute/v2/flavors/urls.go
generated
vendored
4
vendor/github.com/gophercloud/gophercloud/openstack/compute/v2/flavors/urls.go
generated
vendored
@ -11,3 +11,7 @@ func getURL(client *gophercloud.ServiceClient, id string) string {
|
|||||||
func listURL(client *gophercloud.ServiceClient) string {
|
func listURL(client *gophercloud.ServiceClient) string {
|
||||||
return client.ServiceURL("flavors", "detail")
|
return client.ServiceURL("flavors", "detail")
|
||||||
}
|
}
|
||||||
|
|
||||||
|
func createURL(client *gophercloud.ServiceClient) string {
|
||||||
|
return client.ServiceURL("flavors")
|
||||||
|
}
|
||||||
|
2
vendor/github.com/gophercloud/gophercloud/openstack/compute/v2/images/results.go
generated
vendored
2
vendor/github.com/gophercloud/gophercloud/openstack/compute/v2/images/results.go
generated
vendored
@ -46,7 +46,7 @@ type Image struct {
|
|||||||
|
|
||||||
Updated string
|
Updated string
|
||||||
|
|
||||||
Metadata map[string]string
|
Metadata map[string]interface{}
|
||||||
}
|
}
|
||||||
|
|
||||||
// ImagePage contains a single page of results from a List operation.
|
// ImagePage contains a single page of results from a List operation.
|
||||||
|
3
vendor/github.com/gophercloud/gophercloud/openstack/compute/v2/servers/requests.go
generated
vendored
3
vendor/github.com/gophercloud/gophercloud/openstack/compute/v2/servers/requests.go
generated
vendored
@ -401,11 +401,10 @@ type RebuildOptsBuilder interface {
|
|||||||
// operation
|
// operation
|
||||||
type RebuildOpts struct {
|
type RebuildOpts struct {
|
||||||
// The server's admin password
|
// The server's admin password
|
||||||
AdminPass string `json:"adminPass" required:"true"`
|
AdminPass string `json:"adminPass,omitempty"`
|
||||||
// The ID of the image you want your server to be provisioned on
|
// The ID of the image you want your server to be provisioned on
|
||||||
ImageID string `json:"imageRef"`
|
ImageID string `json:"imageRef"`
|
||||||
ImageName string `json:"-"`
|
ImageName string `json:"-"`
|
||||||
//ImageName string `json:"-"`
|
|
||||||
// Name to set the server to
|
// Name to set the server to
|
||||||
Name string `json:"name,omitempty"`
|
Name string `json:"name,omitempty"`
|
||||||
// AccessIPv4 [optional] provides a new IPv4 address for the instance.
|
// AccessIPv4 [optional] provides a new IPv4 address for the instance.
|
||||||
|
22
vendor/github.com/gophercloud/gophercloud/openstack/compute/v2/servers/results.go
generated
vendored
22
vendor/github.com/gophercloud/gophercloud/openstack/compute/v2/servers/results.go
generated
vendored
@ -19,11 +19,17 @@ type serverResult struct {
|
|||||||
|
|
||||||
// Extract interprets any serverResult as a Server, if possible.
|
// Extract interprets any serverResult as a Server, if possible.
|
||||||
func (r serverResult) Extract() (*Server, error) {
|
func (r serverResult) Extract() (*Server, error) {
|
||||||
var s struct {
|
var s Server
|
||||||
Server *Server `json:"server"`
|
|
||||||
}
|
|
||||||
err := r.ExtractInto(&s)
|
err := r.ExtractInto(&s)
|
||||||
return s.Server, err
|
return &s, err
|
||||||
|
}
|
||||||
|
|
||||||
|
func (r serverResult) ExtractInto(v interface{}) error {
|
||||||
|
return r.Result.ExtractIntoStructPtr(v, "server")
|
||||||
|
}
|
||||||
|
|
||||||
|
func ExtractServersInto(r pagination.Page, v interface{}) error {
|
||||||
|
return r.(ServerPage).Result.ExtractIntoSlicePtr(v, "servers")
|
||||||
}
|
}
|
||||||
|
|
||||||
// CreateResult temporarily contains the response from a Create call.
|
// CreateResult temporarily contains the response from a Create call.
|
||||||
@ -221,11 +227,9 @@ func (r ServerPage) NextPageURL() (string, error) {
|
|||||||
|
|
||||||
// ExtractServers interprets the results of a single page from a List() call, producing a slice of Server entities.
|
// ExtractServers interprets the results of a single page from a List() call, producing a slice of Server entities.
|
||||||
func ExtractServers(r pagination.Page) ([]Server, error) {
|
func ExtractServers(r pagination.Page) ([]Server, error) {
|
||||||
var s struct {
|
var s []Server
|
||||||
Servers []Server `json:"servers"`
|
err := ExtractServersInto(r, &s)
|
||||||
}
|
return s, err
|
||||||
err := (r.(ServerPage)).ExtractInto(&s)
|
|
||||||
return s.Servers, err
|
|
||||||
}
|
}
|
||||||
|
|
||||||
// MetadataResult contains the result of a call for (potentially) multiple key-value pairs.
|
// MetadataResult contains the result of a call for (potentially) multiple key-value pairs.
|
||||||
|
@ -21,6 +21,7 @@ type ListOpts struct {
|
|||||||
Marker string `q:"marker"`
|
Marker string `q:"marker"`
|
||||||
SortKey string `q:"sort_key"`
|
SortKey string `q:"sort_key"`
|
||||||
SortDir string `q:"sort_dir"`
|
SortDir string `q:"sort_dir"`
|
||||||
|
RouterID string `q:"router_id"`
|
||||||
}
|
}
|
||||||
|
|
||||||
// List returns a Pager which allows you to iterate over a collection of
|
// List returns a Pager which allows you to iterate over a collection of
|
||||||
|
@ -34,6 +34,9 @@ type FloatingIP struct {
|
|||||||
|
|
||||||
// The condition of the API resource.
|
// The condition of the API resource.
|
||||||
Status string `json:"status"`
|
Status string `json:"status"`
|
||||||
|
|
||||||
|
//The ID of the router used for this Floating-IP
|
||||||
|
RouterID string `json:"router_id"`
|
||||||
}
|
}
|
||||||
|
|
||||||
type commonResult struct {
|
type commonResult struct {
|
||||||
|
@ -49,11 +49,29 @@ type RuleEtherType string
|
|||||||
const (
|
const (
|
||||||
DirIngress RuleDirection = "ingress"
|
DirIngress RuleDirection = "ingress"
|
||||||
DirEgress RuleDirection = "egress"
|
DirEgress RuleDirection = "egress"
|
||||||
ProtocolTCP RuleProtocol = "tcp"
|
|
||||||
ProtocolUDP RuleProtocol = "udp"
|
|
||||||
ProtocolICMP RuleProtocol = "icmp"
|
|
||||||
EtherType4 RuleEtherType = "IPv4"
|
EtherType4 RuleEtherType = "IPv4"
|
||||||
EtherType6 RuleEtherType = "IPv6"
|
EtherType6 RuleEtherType = "IPv6"
|
||||||
|
ProtocolAH RuleProtocol = "ah"
|
||||||
|
ProtocolDCCP RuleProtocol = "dccp"
|
||||||
|
ProtocolEGP RuleProtocol = "egp"
|
||||||
|
ProtocolESP RuleProtocol = "esp"
|
||||||
|
ProtocolGRE RuleProtocol = "gre"
|
||||||
|
ProtocolICMP RuleProtocol = "icmp"
|
||||||
|
ProtocolIGMP RuleProtocol = "igmp"
|
||||||
|
ProtocolIPv6Encap RuleProtocol = "ipv6-encap"
|
||||||
|
ProtocolIPv6Frag RuleProtocol = "ipv6-frag"
|
||||||
|
ProtocolIPv6ICMP RuleProtocol = "ipv6-icmp"
|
||||||
|
ProtocolIPv6NoNxt RuleProtocol = "ipv6-nonxt"
|
||||||
|
ProtocolIPv6Opts RuleProtocol = "ipv6-opts"
|
||||||
|
ProtocolIPv6Route RuleProtocol = "ipv6-route"
|
||||||
|
ProtocolOSPF RuleProtocol = "ospf"
|
||||||
|
ProtocolPGM RuleProtocol = "pgm"
|
||||||
|
ProtocolRSVP RuleProtocol = "rsvp"
|
||||||
|
ProtocolSCTP RuleProtocol = "sctp"
|
||||||
|
ProtocolTCP RuleProtocol = "tcp"
|
||||||
|
ProtocolUDP RuleProtocol = "udp"
|
||||||
|
ProtocolUDPLite RuleProtocol = "udplite"
|
||||||
|
ProtocolVRRP RuleProtocol = "vrrp"
|
||||||
)
|
)
|
||||||
|
|
||||||
// CreateOptsBuilder is what types must satisfy to be used as Create
|
// CreateOptsBuilder is what types must satisfy to be used as Create
|
||||||
|
21
vendor/github.com/gophercloud/gophercloud/pagination/pager.go
generated
vendored
21
vendor/github.com/gophercloud/gophercloud/pagination/pager.go
generated
vendored
@ -145,26 +145,23 @@ func (p Pager) AllPages() (Page, error) {
|
|||||||
|
|
||||||
// Switch on the page body type. Recognized types are `map[string]interface{}`,
|
// Switch on the page body type. Recognized types are `map[string]interface{}`,
|
||||||
// `[]byte`, and `[]interface{}`.
|
// `[]byte`, and `[]interface{}`.
|
||||||
switch testPage.GetBody().(type) {
|
switch pb := testPage.GetBody().(type) {
|
||||||
case map[string]interface{}:
|
case map[string]interface{}:
|
||||||
// key is the map key for the page body if the body type is `map[string]interface{}`.
|
// key is the map key for the page body if the body type is `map[string]interface{}`.
|
||||||
var key string
|
var key string
|
||||||
// Iterate over the pages to concatenate the bodies.
|
// Iterate over the pages to concatenate the bodies.
|
||||||
err = p.EachPage(func(page Page) (bool, error) {
|
err = p.EachPage(func(page Page) (bool, error) {
|
||||||
b := page.GetBody().(map[string]interface{})
|
b := page.GetBody().(map[string]interface{})
|
||||||
for k := range b {
|
for k, v := range b {
|
||||||
// If it's a linked page, we don't want the `links`, we want the other one.
|
// If it's a linked page, we don't want the `links`, we want the other one.
|
||||||
if !strings.HasSuffix(k, "links") {
|
if !strings.HasSuffix(k, "links") {
|
||||||
key = k
|
// check the field's type. we only want []interface{} (which is really []map[string]interface{})
|
||||||
}
|
switch vt := v.(type) {
|
||||||
}
|
|
||||||
switch keyType := b[key].(type) {
|
|
||||||
case map[string]interface{}:
|
|
||||||
pagesSlice = append(pagesSlice, keyType)
|
|
||||||
case []interface{}:
|
case []interface{}:
|
||||||
pagesSlice = append(pagesSlice, b[key].([]interface{})...)
|
key = k
|
||||||
default:
|
pagesSlice = append(pagesSlice, vt...)
|
||||||
return false, fmt.Errorf("Unsupported page body type: %+v", keyType)
|
}
|
||||||
|
}
|
||||||
}
|
}
|
||||||
return true, nil
|
return true, nil
|
||||||
})
|
})
|
||||||
@ -216,7 +213,7 @@ func (p Pager) AllPages() (Page, error) {
|
|||||||
default:
|
default:
|
||||||
err := gophercloud.ErrUnexpectedType{}
|
err := gophercloud.ErrUnexpectedType{}
|
||||||
err.Expected = "map[string]interface{}/[]byte/[]interface{}"
|
err.Expected = "map[string]interface{}/[]byte/[]interface{}"
|
||||||
err.Actual = fmt.Sprintf("%v", reflect.TypeOf(testPage.GetBody()))
|
err.Actual = fmt.Sprintf("%T", pb)
|
||||||
return nil, err
|
return nil, err
|
||||||
}
|
}
|
||||||
|
|
||||||
|
1
vendor/github.com/heketi/heketi/AUTHORS
generated
vendored
1
vendor/github.com/heketi/heketi/AUTHORS
generated
vendored
@ -6,3 +6,4 @@ mliyazud@redhat.com
|
|||||||
nerawat@redhat.com
|
nerawat@redhat.com
|
||||||
obnox@redhat.com
|
obnox@redhat.com
|
||||||
obnox@samba.org
|
obnox@samba.org
|
||||||
|
lpabon@gmail.com
|
||||||
|
Loading…
Reference in New Issue
Block a user