mirror of
https://github.com/k3s-io/kubernetes.git
synced 2025-07-28 22:17:14 +00:00
parent
33d85b01fe
commit
ddfcf1e193
60
Godeps/Godeps.json
generated
60
Godeps/Godeps.json
generated
@ -1761,123 +1761,123 @@
|
|||||||
},
|
},
|
||||||
{
|
{
|
||||||
"ImportPath": "github.com/gophercloud/gophercloud",
|
"ImportPath": "github.com/gophercloud/gophercloud",
|
||||||
"Rev": "6da026c32e2d622cc242d32984259c77237aefe1"
|
"Rev": "781450b3c4fcb4f5182bcc5133adb4b2e4a09d1d"
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
"ImportPath": "github.com/gophercloud/gophercloud/openstack",
|
"ImportPath": "github.com/gophercloud/gophercloud/openstack",
|
||||||
"Rev": "6da026c32e2d622cc242d32984259c77237aefe1"
|
"Rev": "781450b3c4fcb4f5182bcc5133adb4b2e4a09d1d"
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
"ImportPath": "github.com/gophercloud/gophercloud/openstack/blockstorage/extensions/volumeactions",
|
"ImportPath": "github.com/gophercloud/gophercloud/openstack/blockstorage/extensions/volumeactions",
|
||||||
"Rev": "6da026c32e2d622cc242d32984259c77237aefe1"
|
"Rev": "781450b3c4fcb4f5182bcc5133adb4b2e4a09d1d"
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
"ImportPath": "github.com/gophercloud/gophercloud/openstack/blockstorage/v1/volumes",
|
"ImportPath": "github.com/gophercloud/gophercloud/openstack/blockstorage/v1/volumes",
|
||||||
"Rev": "6da026c32e2d622cc242d32984259c77237aefe1"
|
"Rev": "781450b3c4fcb4f5182bcc5133adb4b2e4a09d1d"
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
"ImportPath": "github.com/gophercloud/gophercloud/openstack/blockstorage/v2/volumes",
|
"ImportPath": "github.com/gophercloud/gophercloud/openstack/blockstorage/v2/volumes",
|
||||||
"Rev": "6da026c32e2d622cc242d32984259c77237aefe1"
|
"Rev": "781450b3c4fcb4f5182bcc5133adb4b2e4a09d1d"
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
"ImportPath": "github.com/gophercloud/gophercloud/openstack/blockstorage/v3/volumes",
|
"ImportPath": "github.com/gophercloud/gophercloud/openstack/blockstorage/v3/volumes",
|
||||||
"Rev": "6da026c32e2d622cc242d32984259c77237aefe1"
|
"Rev": "781450b3c4fcb4f5182bcc5133adb4b2e4a09d1d"
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
"ImportPath": "github.com/gophercloud/gophercloud/openstack/common/extensions",
|
"ImportPath": "github.com/gophercloud/gophercloud/openstack/common/extensions",
|
||||||
"Rev": "6da026c32e2d622cc242d32984259c77237aefe1"
|
"Rev": "781450b3c4fcb4f5182bcc5133adb4b2e4a09d1d"
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
"ImportPath": "github.com/gophercloud/gophercloud/openstack/compute/v2/extensions/attachinterfaces",
|
"ImportPath": "github.com/gophercloud/gophercloud/openstack/compute/v2/extensions/attachinterfaces",
|
||||||
"Rev": "6da026c32e2d622cc242d32984259c77237aefe1"
|
"Rev": "781450b3c4fcb4f5182bcc5133adb4b2e4a09d1d"
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
"ImportPath": "github.com/gophercloud/gophercloud/openstack/compute/v2/extensions/volumeattach",
|
"ImportPath": "github.com/gophercloud/gophercloud/openstack/compute/v2/extensions/volumeattach",
|
||||||
"Rev": "6da026c32e2d622cc242d32984259c77237aefe1"
|
"Rev": "781450b3c4fcb4f5182bcc5133adb4b2e4a09d1d"
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
"ImportPath": "github.com/gophercloud/gophercloud/openstack/compute/v2/flavors",
|
"ImportPath": "github.com/gophercloud/gophercloud/openstack/compute/v2/flavors",
|
||||||
"Rev": "6da026c32e2d622cc242d32984259c77237aefe1"
|
"Rev": "781450b3c4fcb4f5182bcc5133adb4b2e4a09d1d"
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
"ImportPath": "github.com/gophercloud/gophercloud/openstack/compute/v2/images",
|
"ImportPath": "github.com/gophercloud/gophercloud/openstack/compute/v2/images",
|
||||||
"Rev": "6da026c32e2d622cc242d32984259c77237aefe1"
|
"Rev": "781450b3c4fcb4f5182bcc5133adb4b2e4a09d1d"
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
"ImportPath": "github.com/gophercloud/gophercloud/openstack/compute/v2/servers",
|
"ImportPath": "github.com/gophercloud/gophercloud/openstack/compute/v2/servers",
|
||||||
"Rev": "6da026c32e2d622cc242d32984259c77237aefe1"
|
"Rev": "781450b3c4fcb4f5182bcc5133adb4b2e4a09d1d"
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
"ImportPath": "github.com/gophercloud/gophercloud/openstack/identity/v2/tenants",
|
"ImportPath": "github.com/gophercloud/gophercloud/openstack/identity/v2/tenants",
|
||||||
"Rev": "6da026c32e2d622cc242d32984259c77237aefe1"
|
"Rev": "781450b3c4fcb4f5182bcc5133adb4b2e4a09d1d"
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
"ImportPath": "github.com/gophercloud/gophercloud/openstack/identity/v2/tokens",
|
"ImportPath": "github.com/gophercloud/gophercloud/openstack/identity/v2/tokens",
|
||||||
"Rev": "6da026c32e2d622cc242d32984259c77237aefe1"
|
"Rev": "781450b3c4fcb4f5182bcc5133adb4b2e4a09d1d"
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
"ImportPath": "github.com/gophercloud/gophercloud/openstack/identity/v3/extensions/trusts",
|
"ImportPath": "github.com/gophercloud/gophercloud/openstack/identity/v3/extensions/trusts",
|
||||||
"Rev": "6da026c32e2d622cc242d32984259c77237aefe1"
|
"Rev": "781450b3c4fcb4f5182bcc5133adb4b2e4a09d1d"
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
"ImportPath": "github.com/gophercloud/gophercloud/openstack/identity/v3/tokens",
|
"ImportPath": "github.com/gophercloud/gophercloud/openstack/identity/v3/tokens",
|
||||||
"Rev": "6da026c32e2d622cc242d32984259c77237aefe1"
|
"Rev": "781450b3c4fcb4f5182bcc5133adb4b2e4a09d1d"
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
"ImportPath": "github.com/gophercloud/gophercloud/openstack/networking/v2/extensions",
|
"ImportPath": "github.com/gophercloud/gophercloud/openstack/networking/v2/extensions",
|
||||||
"Rev": "6da026c32e2d622cc242d32984259c77237aefe1"
|
"Rev": "781450b3c4fcb4f5182bcc5133adb4b2e4a09d1d"
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
"ImportPath": "github.com/gophercloud/gophercloud/openstack/networking/v2/extensions/external",
|
"ImportPath": "github.com/gophercloud/gophercloud/openstack/networking/v2/extensions/external",
|
||||||
"Rev": "6da026c32e2d622cc242d32984259c77237aefe1"
|
"Rev": "781450b3c4fcb4f5182bcc5133adb4b2e4a09d1d"
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
"ImportPath": "github.com/gophercloud/gophercloud/openstack/networking/v2/extensions/layer3/floatingips",
|
"ImportPath": "github.com/gophercloud/gophercloud/openstack/networking/v2/extensions/layer3/floatingips",
|
||||||
"Rev": "6da026c32e2d622cc242d32984259c77237aefe1"
|
"Rev": "781450b3c4fcb4f5182bcc5133adb4b2e4a09d1d"
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
"ImportPath": "github.com/gophercloud/gophercloud/openstack/networking/v2/extensions/layer3/routers",
|
"ImportPath": "github.com/gophercloud/gophercloud/openstack/networking/v2/extensions/layer3/routers",
|
||||||
"Rev": "6da026c32e2d622cc242d32984259c77237aefe1"
|
"Rev": "781450b3c4fcb4f5182bcc5133adb4b2e4a09d1d"
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
"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": "6da026c32e2d622cc242d32984259c77237aefe1"
|
"Rev": "781450b3c4fcb4f5182bcc5133adb4b2e4a09d1d"
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
"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": "6da026c32e2d622cc242d32984259c77237aefe1"
|
"Rev": "781450b3c4fcb4f5182bcc5133adb4b2e4a09d1d"
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
"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": "6da026c32e2d622cc242d32984259c77237aefe1"
|
"Rev": "781450b3c4fcb4f5182bcc5133adb4b2e4a09d1d"
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
"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": "6da026c32e2d622cc242d32984259c77237aefe1"
|
"Rev": "781450b3c4fcb4f5182bcc5133adb4b2e4a09d1d"
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
"ImportPath": "github.com/gophercloud/gophercloud/openstack/networking/v2/extensions/security/groups",
|
"ImportPath": "github.com/gophercloud/gophercloud/openstack/networking/v2/extensions/security/groups",
|
||||||
"Rev": "6da026c32e2d622cc242d32984259c77237aefe1"
|
"Rev": "781450b3c4fcb4f5182bcc5133adb4b2e4a09d1d"
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
"ImportPath": "github.com/gophercloud/gophercloud/openstack/networking/v2/extensions/security/rules",
|
"ImportPath": "github.com/gophercloud/gophercloud/openstack/networking/v2/extensions/security/rules",
|
||||||
"Rev": "6da026c32e2d622cc242d32984259c77237aefe1"
|
"Rev": "781450b3c4fcb4f5182bcc5133adb4b2e4a09d1d"
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
"ImportPath": "github.com/gophercloud/gophercloud/openstack/networking/v2/networks",
|
"ImportPath": "github.com/gophercloud/gophercloud/openstack/networking/v2/networks",
|
||||||
"Rev": "6da026c32e2d622cc242d32984259c77237aefe1"
|
"Rev": "781450b3c4fcb4f5182bcc5133adb4b2e4a09d1d"
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
"ImportPath": "github.com/gophercloud/gophercloud/openstack/networking/v2/ports",
|
"ImportPath": "github.com/gophercloud/gophercloud/openstack/networking/v2/ports",
|
||||||
"Rev": "6da026c32e2d622cc242d32984259c77237aefe1"
|
"Rev": "781450b3c4fcb4f5182bcc5133adb4b2e4a09d1d"
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
"ImportPath": "github.com/gophercloud/gophercloud/openstack/utils",
|
"ImportPath": "github.com/gophercloud/gophercloud/openstack/utils",
|
||||||
"Rev": "6da026c32e2d622cc242d32984259c77237aefe1"
|
"Rev": "781450b3c4fcb4f5182bcc5133adb4b2e4a09d1d"
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
"ImportPath": "github.com/gophercloud/gophercloud/pagination",
|
"ImportPath": "github.com/gophercloud/gophercloud/pagination",
|
||||||
"Rev": "6da026c32e2d622cc242d32984259c77237aefe1"
|
"Rev": "781450b3c4fcb4f5182bcc5133adb4b2e4a09d1d"
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
"ImportPath": "github.com/gorilla/websocket",
|
"ImportPath": "github.com/gorilla/websocket",
|
||||||
|
14
staging/src/k8s.io/client-go/Godeps/Godeps.json
generated
14
staging/src/k8s.io/client-go/Godeps/Godeps.json
generated
@ -104,31 +104,31 @@
|
|||||||
},
|
},
|
||||||
{
|
{
|
||||||
"ImportPath": "github.com/gophercloud/gophercloud",
|
"ImportPath": "github.com/gophercloud/gophercloud",
|
||||||
"Rev": "6da026c32e2d622cc242d32984259c77237aefe1"
|
"Rev": "781450b3c4fcb4f5182bcc5133adb4b2e4a09d1d"
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
"ImportPath": "github.com/gophercloud/gophercloud/openstack",
|
"ImportPath": "github.com/gophercloud/gophercloud/openstack",
|
||||||
"Rev": "6da026c32e2d622cc242d32984259c77237aefe1"
|
"Rev": "781450b3c4fcb4f5182bcc5133adb4b2e4a09d1d"
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
"ImportPath": "github.com/gophercloud/gophercloud/openstack/identity/v2/tenants",
|
"ImportPath": "github.com/gophercloud/gophercloud/openstack/identity/v2/tenants",
|
||||||
"Rev": "6da026c32e2d622cc242d32984259c77237aefe1"
|
"Rev": "781450b3c4fcb4f5182bcc5133adb4b2e4a09d1d"
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
"ImportPath": "github.com/gophercloud/gophercloud/openstack/identity/v2/tokens",
|
"ImportPath": "github.com/gophercloud/gophercloud/openstack/identity/v2/tokens",
|
||||||
"Rev": "6da026c32e2d622cc242d32984259c77237aefe1"
|
"Rev": "781450b3c4fcb4f5182bcc5133adb4b2e4a09d1d"
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
"ImportPath": "github.com/gophercloud/gophercloud/openstack/identity/v3/tokens",
|
"ImportPath": "github.com/gophercloud/gophercloud/openstack/identity/v3/tokens",
|
||||||
"Rev": "6da026c32e2d622cc242d32984259c77237aefe1"
|
"Rev": "781450b3c4fcb4f5182bcc5133adb4b2e4a09d1d"
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
"ImportPath": "github.com/gophercloud/gophercloud/openstack/utils",
|
"ImportPath": "github.com/gophercloud/gophercloud/openstack/utils",
|
||||||
"Rev": "6da026c32e2d622cc242d32984259c77237aefe1"
|
"Rev": "781450b3c4fcb4f5182bcc5133adb4b2e4a09d1d"
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
"ImportPath": "github.com/gophercloud/gophercloud/pagination",
|
"ImportPath": "github.com/gophercloud/gophercloud/pagination",
|
||||||
"Rev": "6da026c32e2d622cc242d32984259c77237aefe1"
|
"Rev": "781450b3c4fcb4f5182bcc5133adb4b2e4a09d1d"
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
"ImportPath": "github.com/hashicorp/golang-lru",
|
"ImportPath": "github.com/hashicorp/golang-lru",
|
||||||
|
18
vendor/github.com/gophercloud/gophercloud/errors.go
generated
vendored
18
vendor/github.com/gophercloud/gophercloud/errors.go
generated
vendored
@ -72,6 +72,11 @@ type ErrDefault401 struct {
|
|||||||
ErrUnexpectedResponseCode
|
ErrUnexpectedResponseCode
|
||||||
}
|
}
|
||||||
|
|
||||||
|
// ErrDefault403 is the default error type returned on a 403 HTTP response code.
|
||||||
|
type ErrDefault403 struct {
|
||||||
|
ErrUnexpectedResponseCode
|
||||||
|
}
|
||||||
|
|
||||||
// ErrDefault404 is the default error type returned on a 404 HTTP response code.
|
// ErrDefault404 is the default error type returned on a 404 HTTP response code.
|
||||||
type ErrDefault404 struct {
|
type ErrDefault404 struct {
|
||||||
ErrUnexpectedResponseCode
|
ErrUnexpectedResponseCode
|
||||||
@ -108,6 +113,13 @@ func (e ErrDefault400) Error() string {
|
|||||||
func (e ErrDefault401) Error() string {
|
func (e ErrDefault401) Error() string {
|
||||||
return "Authentication failed"
|
return "Authentication failed"
|
||||||
}
|
}
|
||||||
|
func (e ErrDefault403) Error() string {
|
||||||
|
e.DefaultErrString = fmt.Sprintf(
|
||||||
|
"Request forbidden: [%s %s], error message: %s",
|
||||||
|
e.Method, e.URL, e.Body,
|
||||||
|
)
|
||||||
|
return e.choseErrString()
|
||||||
|
}
|
||||||
func (e ErrDefault404) Error() string {
|
func (e ErrDefault404) Error() string {
|
||||||
return "Resource not found"
|
return "Resource not found"
|
||||||
}
|
}
|
||||||
@ -141,6 +153,12 @@ type Err401er interface {
|
|||||||
Error401(ErrUnexpectedResponseCode) error
|
Error401(ErrUnexpectedResponseCode) error
|
||||||
}
|
}
|
||||||
|
|
||||||
|
// Err403er is the interface resource error types implement to override the error message
|
||||||
|
// from a 403 error.
|
||||||
|
type Err403er interface {
|
||||||
|
Error403(ErrUnexpectedResponseCode) error
|
||||||
|
}
|
||||||
|
|
||||||
// Err404er is the interface resource error types implement to override the error message
|
// Err404er is the interface resource error types implement to override the error message
|
||||||
// from a 404 error.
|
// from a 404 error.
|
||||||
type Err404er interface {
|
type Err404er interface {
|
||||||
|
6
vendor/github.com/gophercloud/gophercloud/openstack/client.go
generated
vendored
6
vendor/github.com/gophercloud/gophercloud/openstack/client.go
generated
vendored
@ -394,3 +394,9 @@ func NewLoadBalancerV2(client *gophercloud.ProviderClient, eo gophercloud.Endpoi
|
|||||||
sc.ResourceBase = sc.Endpoint + "v2.0/"
|
sc.ResourceBase = sc.Endpoint + "v2.0/"
|
||||||
return sc, err
|
return sc, err
|
||||||
}
|
}
|
||||||
|
|
||||||
|
// NewClusteringV1 creates a ServiceClient that may be used with the v1 clustering
|
||||||
|
// package.
|
||||||
|
func NewClusteringV1(client *gophercloud.ProviderClient, eo gophercloud.EndpointOpts) (*gophercloud.ServiceClient, error) {
|
||||||
|
return initClientOpts(client, eo, "clustering")
|
||||||
|
}
|
||||||
|
30
vendor/github.com/gophercloud/gophercloud/openstack/compute/v2/flavors/requests.go
generated
vendored
30
vendor/github.com/gophercloud/gophercloud/openstack/compute/v2/flavors/requests.go
generated
vendored
@ -236,21 +236,22 @@ func GetExtraSpec(client *gophercloud.ServiceClient, flavorID string, key string
|
|||||||
// CreateExtraSpecsOptsBuilder allows extensions to add additional parameters to the
|
// CreateExtraSpecsOptsBuilder allows extensions to add additional parameters to the
|
||||||
// CreateExtraSpecs requests.
|
// CreateExtraSpecs requests.
|
||||||
type CreateExtraSpecsOptsBuilder interface {
|
type CreateExtraSpecsOptsBuilder interface {
|
||||||
ToExtraSpecsCreateMap() (map[string]interface{}, error)
|
ToFlavorExtraSpecsCreateMap() (map[string]interface{}, error)
|
||||||
}
|
}
|
||||||
|
|
||||||
// ExtraSpecsOpts is a map that contains key-value pairs.
|
// ExtraSpecsOpts is a map that contains key-value pairs.
|
||||||
type ExtraSpecsOpts map[string]string
|
type ExtraSpecsOpts map[string]string
|
||||||
|
|
||||||
// ToExtraSpecsCreateMap assembles a body for a Create request based on the
|
// ToFlavorExtraSpecsCreateMap assembles a body for a Create request based on
|
||||||
// contents of a ExtraSpecsOpts
|
// the contents of ExtraSpecsOpts.
|
||||||
func (opts ExtraSpecsOpts) ToExtraSpecsCreateMap() (map[string]interface{}, error) {
|
func (opts ExtraSpecsOpts) ToFlavorExtraSpecsCreateMap() (map[string]interface{}, error) {
|
||||||
return map[string]interface{}{"extra_specs": opts}, nil
|
return map[string]interface{}{"extra_specs": opts}, nil
|
||||||
}
|
}
|
||||||
|
|
||||||
// CreateExtraSpecs will create or update the extra-specs key-value pairs for the specified Flavor
|
// CreateExtraSpecs will create or update the extra-specs key-value pairs for
|
||||||
|
// the specified Flavor.
|
||||||
func CreateExtraSpecs(client *gophercloud.ServiceClient, flavorID string, opts CreateExtraSpecsOptsBuilder) (r CreateExtraSpecsResult) {
|
func CreateExtraSpecs(client *gophercloud.ServiceClient, flavorID string, opts CreateExtraSpecsOptsBuilder) (r CreateExtraSpecsResult) {
|
||||||
b, err := opts.ToExtraSpecsCreateMap()
|
b, err := opts.ToFlavorExtraSpecsCreateMap()
|
||||||
if err != nil {
|
if err != nil {
|
||||||
r.Err = err
|
r.Err = err
|
||||||
return
|
return
|
||||||
@ -261,15 +262,15 @@ func CreateExtraSpecs(client *gophercloud.ServiceClient, flavorID string, opts C
|
|||||||
return
|
return
|
||||||
}
|
}
|
||||||
|
|
||||||
// UpdateExtraSpecOptsBuilder allows extensions to add additional parameters to the
|
// UpdateExtraSpecOptsBuilder allows extensions to add additional parameters to
|
||||||
// Update request.
|
// the Update request.
|
||||||
type UpdateExtraSpecOptsBuilder interface {
|
type UpdateExtraSpecOptsBuilder interface {
|
||||||
ToExtraSpecUpdateMap() (map[string]string, string, error)
|
ToFlavorExtraSpecUpdateMap() (map[string]string, string, error)
|
||||||
}
|
}
|
||||||
|
|
||||||
// ToExtraSpecUpdateMap assembles a body for an Update request based on the
|
// ToFlavorExtraSpecUpdateMap assembles a body for an Update request based on
|
||||||
// contents of a ExtraSpecOpts.
|
// the contents of a ExtraSpecOpts.
|
||||||
func (opts ExtraSpecsOpts) ToExtraSpecUpdateMap() (map[string]string, string, error) {
|
func (opts ExtraSpecsOpts) ToFlavorExtraSpecUpdateMap() (map[string]string, string, error) {
|
||||||
if len(opts) != 1 {
|
if len(opts) != 1 {
|
||||||
err := gophercloud.ErrInvalidInput{}
|
err := gophercloud.ErrInvalidInput{}
|
||||||
err.Argument = "flavors.ExtraSpecOpts"
|
err.Argument = "flavors.ExtraSpecOpts"
|
||||||
@ -285,9 +286,10 @@ func (opts ExtraSpecsOpts) ToExtraSpecUpdateMap() (map[string]string, string, er
|
|||||||
return opts, key, nil
|
return opts, key, nil
|
||||||
}
|
}
|
||||||
|
|
||||||
// UpdateExtraSpec will updates the value of the specified flavor's extra spec for the key in opts.
|
// UpdateExtraSpec will updates the value of the specified flavor's extra spec
|
||||||
|
// for the key in opts.
|
||||||
func UpdateExtraSpec(client *gophercloud.ServiceClient, flavorID string, opts UpdateExtraSpecOptsBuilder) (r UpdateExtraSpecResult) {
|
func UpdateExtraSpec(client *gophercloud.ServiceClient, flavorID string, opts UpdateExtraSpecOptsBuilder) (r UpdateExtraSpecResult) {
|
||||||
b, key, err := opts.ToExtraSpecUpdateMap()
|
b, key, err := opts.ToFlavorExtraSpecUpdateMap()
|
||||||
if err != nil {
|
if err != nil {
|
||||||
r.Err = err
|
r.Err = err
|
||||||
return
|
return
|
||||||
|
2
vendor/github.com/gophercloud/gophercloud/openstack/endpoint_location.go
generated
vendored
2
vendor/github.com/gophercloud/gophercloud/openstack/endpoint_location.go
generated
vendored
@ -84,7 +84,7 @@ func V3EndpointURL(catalog *tokens3.ServiceCatalog, opts gophercloud.EndpointOpt
|
|||||||
return "", err
|
return "", err
|
||||||
}
|
}
|
||||||
if (opts.Availability == gophercloud.Availability(endpoint.Interface)) &&
|
if (opts.Availability == gophercloud.Availability(endpoint.Interface)) &&
|
||||||
(opts.Region == "" || endpoint.Region == opts.Region) {
|
(opts.Region == "" || endpoint.Region == opts.Region || endpoint.RegionID == opts.Region) {
|
||||||
endpoints = append(endpoints, endpoint)
|
endpoints = append(endpoints, endpoint)
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
1
vendor/github.com/gophercloud/gophercloud/openstack/identity/v3/tokens/results.go
generated
vendored
1
vendor/github.com/gophercloud/gophercloud/openstack/identity/v3/tokens/results.go
generated
vendored
@ -13,6 +13,7 @@ import (
|
|||||||
type Endpoint struct {
|
type Endpoint struct {
|
||||||
ID string `json:"id"`
|
ID string `json:"id"`
|
||||||
Region string `json:"region"`
|
Region string `json:"region"`
|
||||||
|
RegionID string `json:"region_id"`
|
||||||
Interface string `json:"interface"`
|
Interface string `json:"interface"`
|
||||||
URL string `json:"url"`
|
URL string `json:"url"`
|
||||||
}
|
}
|
||||||
|
@ -17,6 +17,7 @@ type ListOpts struct {
|
|||||||
FixedIP string `q:"fixed_ip_address"`
|
FixedIP string `q:"fixed_ip_address"`
|
||||||
FloatingIP string `q:"floating_ip_address"`
|
FloatingIP string `q:"floating_ip_address"`
|
||||||
TenantID string `q:"tenant_id"`
|
TenantID string `q:"tenant_id"`
|
||||||
|
ProjectID string `q:"project_id"`
|
||||||
Limit int `q:"limit"`
|
Limit int `q:"limit"`
|
||||||
Marker string `q:"marker"`
|
Marker string `q:"marker"`
|
||||||
SortKey string `q:"sort_key"`
|
SortKey string `q:"sort_key"`
|
||||||
@ -55,6 +56,7 @@ type CreateOpts struct {
|
|||||||
FixedIP string `json:"fixed_ip_address,omitempty"`
|
FixedIP string `json:"fixed_ip_address,omitempty"`
|
||||||
SubnetID string `json:"subnet_id,omitempty"`
|
SubnetID string `json:"subnet_id,omitempty"`
|
||||||
TenantID string `json:"tenant_id,omitempty"`
|
TenantID string `json:"tenant_id,omitempty"`
|
||||||
|
ProjectID string `json:"project_id,omitempty"`
|
||||||
}
|
}
|
||||||
|
|
||||||
// ToFloatingIPCreateMap allows CreateOpts to satisfy the CreateOptsBuilder
|
// ToFloatingIPCreateMap allows CreateOpts to satisfy the CreateOptsBuilder
|
||||||
|
@ -30,10 +30,13 @@ type FloatingIP struct {
|
|||||||
// associated with the floating IP.
|
// associated with the floating IP.
|
||||||
FixedIP string `json:"fixed_ip_address"`
|
FixedIP string `json:"fixed_ip_address"`
|
||||||
|
|
||||||
// TenantID is the Owner of the floating IP. Only admin users can specify a
|
// TenantID is the project owner of the floating IP. Only admin users can
|
||||||
// tenant identifier other than its own.
|
// specify a project identifier other than its own.
|
||||||
TenantID string `json:"tenant_id"`
|
TenantID string `json:"tenant_id"`
|
||||||
|
|
||||||
|
// ProjectID is the project owner of the floating IP.
|
||||||
|
ProjectID string `json:"project_id"`
|
||||||
|
|
||||||
// Status is the condition of the API resource.
|
// Status is the condition of the API resource.
|
||||||
Status string `json:"status"`
|
Status string `json:"status"`
|
||||||
|
|
||||||
|
@ -17,6 +17,7 @@ type ListOpts struct {
|
|||||||
Distributed *bool `q:"distributed"`
|
Distributed *bool `q:"distributed"`
|
||||||
Status string `q:"status"`
|
Status string `q:"status"`
|
||||||
TenantID string `q:"tenant_id"`
|
TenantID string `q:"tenant_id"`
|
||||||
|
ProjectID string `q:"project_id"`
|
||||||
Limit int `q:"limit"`
|
Limit int `q:"limit"`
|
||||||
Marker string `q:"marker"`
|
Marker string `q:"marker"`
|
||||||
SortKey string `q:"sort_key"`
|
SortKey string `q:"sort_key"`
|
||||||
@ -53,6 +54,7 @@ type CreateOpts struct {
|
|||||||
AdminStateUp *bool `json:"admin_state_up,omitempty"`
|
AdminStateUp *bool `json:"admin_state_up,omitempty"`
|
||||||
Distributed *bool `json:"distributed,omitempty"`
|
Distributed *bool `json:"distributed,omitempty"`
|
||||||
TenantID string `json:"tenant_id,omitempty"`
|
TenantID string `json:"tenant_id,omitempty"`
|
||||||
|
ProjectID string `json:"project_id,omitempty"`
|
||||||
GatewayInfo *GatewayInfo `json:"external_gateway_info,omitempty"`
|
GatewayInfo *GatewayInfo `json:"external_gateway_info,omitempty"`
|
||||||
AvailabilityZoneHints []string `json:"availability_zone_hints,omitempty"`
|
AvailabilityZoneHints []string `json:"availability_zone_hints,omitempty"`
|
||||||
}
|
}
|
||||||
|
@ -54,10 +54,13 @@ type Router struct {
|
|||||||
// ID is the unique identifier for the router.
|
// ID is the unique identifier for the router.
|
||||||
ID string `json:"id"`
|
ID string `json:"id"`
|
||||||
|
|
||||||
// TenantID is the owner of the router. Only admin users can specify a tenant
|
// TenantID is the project owner of the router. Only admin users can
|
||||||
// identifier other than its own.
|
// specify a project identifier other than its own.
|
||||||
TenantID string `json:"tenant_id"`
|
TenantID string `json:"tenant_id"`
|
||||||
|
|
||||||
|
// ProjectID is the project owner of the router.
|
||||||
|
ProjectID string `json:"project_id"`
|
||||||
|
|
||||||
// Routes are a collection of static routes that the router will host.
|
// Routes are a collection of static routes that the router will host.
|
||||||
Routes []Route `json:"routes"`
|
Routes []Route `json:"routes"`
|
||||||
|
|
||||||
|
@ -31,6 +31,7 @@ type ListOpts struct {
|
|||||||
Name string `q:"name"`
|
Name string `q:"name"`
|
||||||
AdminStateUp *bool `q:"admin_state_up"`
|
AdminStateUp *bool `q:"admin_state_up"`
|
||||||
TenantID string `q:"tenant_id"`
|
TenantID string `q:"tenant_id"`
|
||||||
|
ProjectID string `q:"project_id"`
|
||||||
LoadbalancerID string `q:"loadbalancer_id"`
|
LoadbalancerID string `q:"loadbalancer_id"`
|
||||||
DefaultPoolID string `q:"default_pool_id"`
|
DefaultPoolID string `q:"default_pool_id"`
|
||||||
Protocol string `q:"protocol"`
|
Protocol string `q:"protocol"`
|
||||||
@ -86,9 +87,13 @@ type CreateOpts struct {
|
|||||||
ProtocolPort int `json:"protocol_port" required:"true"`
|
ProtocolPort int `json:"protocol_port" required:"true"`
|
||||||
|
|
||||||
// TenantID is only required if the caller has an admin role and wants
|
// TenantID is only required if the caller has an admin role and wants
|
||||||
// to create a pool for another tenant.
|
// to create a pool for another project.
|
||||||
TenantID string `json:"tenant_id,omitempty"`
|
TenantID string `json:"tenant_id,omitempty"`
|
||||||
|
|
||||||
|
// ProjectID is only required if the caller has an admin role and wants
|
||||||
|
// to create a pool for another project.
|
||||||
|
ProjectID string `json:"project_id,omitempty"`
|
||||||
|
|
||||||
// Human-readable name for the Listener. Does not have to be unique.
|
// Human-readable name for the Listener. Does not have to be unique.
|
||||||
Name string `json:"name,omitempty"`
|
Name string `json:"name,omitempty"`
|
||||||
|
|
||||||
|
@ -1,6 +1,8 @@
|
|||||||
package loadbalancers
|
package loadbalancers
|
||||||
|
|
||||||
import (
|
import (
|
||||||
|
"fmt"
|
||||||
|
|
||||||
"github.com/gophercloud/gophercloud"
|
"github.com/gophercloud/gophercloud"
|
||||||
"github.com/gophercloud/gophercloud/pagination"
|
"github.com/gophercloud/gophercloud/pagination"
|
||||||
)
|
)
|
||||||
@ -20,6 +22,7 @@ type ListOpts struct {
|
|||||||
Description string `q:"description"`
|
Description string `q:"description"`
|
||||||
AdminStateUp *bool `q:"admin_state_up"`
|
AdminStateUp *bool `q:"admin_state_up"`
|
||||||
TenantID string `q:"tenant_id"`
|
TenantID string `q:"tenant_id"`
|
||||||
|
ProjectID string `q:"project_id"`
|
||||||
ProvisioningStatus string `q:"provisioning_status"`
|
ProvisioningStatus string `q:"provisioning_status"`
|
||||||
VipAddress string `q:"vip_address"`
|
VipAddress string `q:"vip_address"`
|
||||||
VipPortID string `q:"vip_port_id"`
|
VipPortID string `q:"vip_port_id"`
|
||||||
@ -35,7 +38,7 @@ type ListOpts struct {
|
|||||||
SortDir string `q:"sort_dir"`
|
SortDir string `q:"sort_dir"`
|
||||||
}
|
}
|
||||||
|
|
||||||
// ToLoadbalancerListQuery formats a ListOpts into a query string.
|
// ToLoadBalancerListQuery formats a ListOpts into a query string.
|
||||||
func (opts ListOpts) ToLoadBalancerListQuery() (string, error) {
|
func (opts ListOpts) ToLoadBalancerListQuery() (string, error) {
|
||||||
q, err := gophercloud.BuildQueryString(opts)
|
q, err := gophercloud.BuildQueryString(opts)
|
||||||
return q.String(), err
|
return q.String(), err
|
||||||
@ -81,10 +84,14 @@ type CreateOpts struct {
|
|||||||
// that belong to them or networks that are shared).
|
// that belong to them or networks that are shared).
|
||||||
VipSubnetID string `json:"vip_subnet_id" required:"true"`
|
VipSubnetID string `json:"vip_subnet_id" required:"true"`
|
||||||
|
|
||||||
// The UUID of the tenant who owns the Loadbalancer. Only administrative users
|
// TenantID is the UUID of the project who owns the Loadbalancer.
|
||||||
// can specify a tenant UUID other than their own.
|
// Only administrative users can specify a project UUID other than their own.
|
||||||
TenantID string `json:"tenant_id,omitempty"`
|
TenantID string `json:"tenant_id,omitempty"`
|
||||||
|
|
||||||
|
// ProjectID is the UUID of the project who owns the Loadbalancer.
|
||||||
|
// Only administrative users can specify a project UUID other than their own.
|
||||||
|
ProjectID string `json:"project_id,omitempty"`
|
||||||
|
|
||||||
// The IP address of the Loadbalancer.
|
// The IP address of the Loadbalancer.
|
||||||
VipAddress string `json:"vip_address,omitempty"`
|
VipAddress string `json:"vip_address,omitempty"`
|
||||||
|
|
||||||
@ -170,6 +177,20 @@ func Delete(c *gophercloud.ServiceClient, id string) (r DeleteResult) {
|
|||||||
return
|
return
|
||||||
}
|
}
|
||||||
|
|
||||||
|
// CascadingDelete is like `Delete`, but will also delete any of the load balancer's
|
||||||
|
// children (listener, monitor, etc).
|
||||||
|
// NOTE: This function will only work with Octavia load balancers; Neutron does not
|
||||||
|
// support this.
|
||||||
|
func CascadingDelete(c *gophercloud.ServiceClient, id string) (r DeleteResult) {
|
||||||
|
if c.Type != "load-balancer" {
|
||||||
|
r.Err = fmt.Errorf("error prior to running cascade delete: only Octavia LBs supported")
|
||||||
|
return
|
||||||
|
}
|
||||||
|
u := fmt.Sprintf("%s?cascade=true", resourceURL(c, id))
|
||||||
|
_, r.Err = c.Delete(u, nil)
|
||||||
|
return
|
||||||
|
}
|
||||||
|
|
||||||
// GetStatuses will return the status of a particular LoadBalancer.
|
// GetStatuses will return the status of a particular LoadBalancer.
|
||||||
func GetStatuses(c *gophercloud.ServiceClient, id string) (r GetStatusesResult) {
|
func GetStatuses(c *gophercloud.ServiceClient, id string) (r GetStatusesResult) {
|
||||||
_, r.Err = c.Get(statusRootURL(c, id), &r.Body, nil)
|
_, r.Err = c.Get(statusRootURL(c, id), &r.Body, nil)
|
||||||
|
@ -79,8 +79,8 @@ func (r LoadBalancerPage) NextPageURL() (string, error) {
|
|||||||
}
|
}
|
||||||
|
|
||||||
// IsEmpty checks whether a LoadBalancerPage struct is empty.
|
// IsEmpty checks whether a LoadBalancerPage struct is empty.
|
||||||
func (p LoadBalancerPage) IsEmpty() (bool, error) {
|
func (r LoadBalancerPage) IsEmpty() (bool, error) {
|
||||||
is, err := ExtractLoadBalancers(p)
|
is, err := ExtractLoadBalancers(r)
|
||||||
return len(is) == 0, err
|
return len(is) == 0, err
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -22,6 +22,7 @@ type ListOpts struct {
|
|||||||
ID string `q:"id"`
|
ID string `q:"id"`
|
||||||
Name string `q:"name"`
|
Name string `q:"name"`
|
||||||
TenantID string `q:"tenant_id"`
|
TenantID string `q:"tenant_id"`
|
||||||
|
ProjectID string `q:"project_id"`
|
||||||
PoolID string `q:"pool_id"`
|
PoolID string `q:"pool_id"`
|
||||||
Type string `q:"type"`
|
Type string `q:"type"`
|
||||||
Delay int `q:"delay"`
|
Delay int `q:"delay"`
|
||||||
@ -119,10 +120,14 @@ type CreateOpts struct {
|
|||||||
// types.
|
// types.
|
||||||
ExpectedCodes string `json:"expected_codes,omitempty"`
|
ExpectedCodes string `json:"expected_codes,omitempty"`
|
||||||
|
|
||||||
// The UUID of the tenant who owns the Monitor. Only administrative users
|
// TenantID is the UUID of the project who owns the Monitor.
|
||||||
// can specify a tenant UUID other than their own.
|
// Only administrative users can specify a project UUID other than their own.
|
||||||
TenantID string `json:"tenant_id,omitempty"`
|
TenantID string `json:"tenant_id,omitempty"`
|
||||||
|
|
||||||
|
// ProjectID is the UUID of the project who owns the Monitor.
|
||||||
|
// Only administrative users can specify a project UUID other than their own.
|
||||||
|
ProjectID string `json:"project_id,omitempty"`
|
||||||
|
|
||||||
// The Name of the Monitor.
|
// The Name of the Monitor.
|
||||||
Name string `json:"name,omitempty"`
|
Name string `json:"name,omitempty"`
|
||||||
|
|
||||||
|
@ -20,6 +20,7 @@ type ListOpts struct {
|
|||||||
LBMethod string `q:"lb_algorithm"`
|
LBMethod string `q:"lb_algorithm"`
|
||||||
Protocol string `q:"protocol"`
|
Protocol string `q:"protocol"`
|
||||||
TenantID string `q:"tenant_id"`
|
TenantID string `q:"tenant_id"`
|
||||||
|
ProjectID string `q:"project_id"`
|
||||||
AdminStateUp *bool `q:"admin_state_up"`
|
AdminStateUp *bool `q:"admin_state_up"`
|
||||||
Name string `q:"name"`
|
Name string `q:"name"`
|
||||||
ID string `q:"id"`
|
ID string `q:"id"`
|
||||||
@ -97,10 +98,14 @@ type CreateOpts struct {
|
|||||||
// Note: one of LoadbalancerID or ListenerID must be provided.
|
// Note: one of LoadbalancerID or ListenerID must be provided.
|
||||||
ListenerID string `json:"listener_id,omitempty" xor:"LoadbalancerID"`
|
ListenerID string `json:"listener_id,omitempty" xor:"LoadbalancerID"`
|
||||||
|
|
||||||
// The UUID of the tenant who owns the Pool. Only administrative users
|
// TenantID is the UUID of the project who owns the Pool.
|
||||||
// can specify a tenant UUID other than their own.
|
// Only administrative users can specify a project UUID other than their own.
|
||||||
TenantID string `json:"tenant_id,omitempty"`
|
TenantID string `json:"tenant_id,omitempty"`
|
||||||
|
|
||||||
|
// ProjectID is the UUID of the project who owns the Pool.
|
||||||
|
// Only administrative users can specify a project UUID other than their own.
|
||||||
|
ProjectID string `json:"project_id,omitempty"`
|
||||||
|
|
||||||
// Name of the pool.
|
// Name of the pool.
|
||||||
Name string `json:"name,omitempty"`
|
Name string `json:"name,omitempty"`
|
||||||
|
|
||||||
@ -257,10 +262,14 @@ type CreateMemberOpts struct {
|
|||||||
// Name of the Member.
|
// Name of the Member.
|
||||||
Name string `json:"name,omitempty"`
|
Name string `json:"name,omitempty"`
|
||||||
|
|
||||||
// The UUID of the tenant who owns the Member. Only administrative users
|
// TenantID is the UUID of the project who owns the Member.
|
||||||
// can specify a tenant UUID other than their own.
|
// Only administrative users can specify a project UUID other than their own.
|
||||||
TenantID string `json:"tenant_id,omitempty"`
|
TenantID string `json:"tenant_id,omitempty"`
|
||||||
|
|
||||||
|
// ProjectID is the UUID of the project who owns the Member.
|
||||||
|
// Only administrative users can specify a project UUID other than their own.
|
||||||
|
ProjectID string `json:"project_id,omitempty"`
|
||||||
|
|
||||||
// A positive integer value that indicates the relative portion of traffic
|
// A positive integer value that indicates the relative portion of traffic
|
||||||
// that this member should receive from the pool. For example, a member with
|
// that this member should receive from the pool. For example, a member with
|
||||||
// a weight of 10 receives five times as much traffic as a member with a
|
// a weight of 10 receives five times as much traffic as a member with a
|
||||||
|
@ -14,6 +14,7 @@ type ListOpts struct {
|
|||||||
ID string `q:"id"`
|
ID string `q:"id"`
|
||||||
Name string `q:"name"`
|
Name string `q:"name"`
|
||||||
TenantID string `q:"tenant_id"`
|
TenantID string `q:"tenant_id"`
|
||||||
|
ProjectID string `q:"project_id"`
|
||||||
Limit int `q:"limit"`
|
Limit int `q:"limit"`
|
||||||
Marker string `q:"marker"`
|
Marker string `q:"marker"`
|
||||||
SortKey string `q:"sort_key"`
|
SortKey string `q:"sort_key"`
|
||||||
@ -45,10 +46,14 @@ type CreateOpts struct {
|
|||||||
// Human-readable name for the Security Group. Does not have to be unique.
|
// Human-readable name for the Security Group. Does not have to be unique.
|
||||||
Name string `json:"name" required:"true"`
|
Name string `json:"name" required:"true"`
|
||||||
|
|
||||||
// The UUID of the tenant who owns the Group. Only administrative users
|
// TenantID is the UUID of the project who owns the Group.
|
||||||
// can specify a tenant UUID other than their own.
|
// Only administrative users can specify a tenant UUID other than their own.
|
||||||
TenantID string `json:"tenant_id,omitempty"`
|
TenantID string `json:"tenant_id,omitempty"`
|
||||||
|
|
||||||
|
// ProjectID is the UUID of the project who owns the Group.
|
||||||
|
// Only administrative users can specify a tenant UUID other than their own.
|
||||||
|
ProjectID string `json:"project_id,omitempty"`
|
||||||
|
|
||||||
// Describes the security group.
|
// Describes the security group.
|
||||||
Description string `json:"description,omitempty"`
|
Description string `json:"description,omitempty"`
|
||||||
}
|
}
|
||||||
|
@ -22,8 +22,11 @@ type SecGroup struct {
|
|||||||
// traffic entering and leaving the group.
|
// traffic entering and leaving the group.
|
||||||
Rules []rules.SecGroupRule `json:"security_group_rules"`
|
Rules []rules.SecGroupRule `json:"security_group_rules"`
|
||||||
|
|
||||||
// Owner of the security group.
|
// TenantID is the project owner of the security group.
|
||||||
TenantID string `json:"tenant_id"`
|
TenantID string `json:"tenant_id"`
|
||||||
|
|
||||||
|
// ProjectID is the project owner of the security group.
|
||||||
|
ProjectID string `json:"project_id"`
|
||||||
}
|
}
|
||||||
|
|
||||||
// SecGroupPage is the page returned by a pager when traversing over a
|
// SecGroupPage is the page returned by a pager when traversing over a
|
||||||
|
@ -21,6 +21,7 @@ type ListOpts struct {
|
|||||||
RemoteIPPrefix string `q:"remote_ip_prefix"`
|
RemoteIPPrefix string `q:"remote_ip_prefix"`
|
||||||
SecGroupID string `q:"security_group_id"`
|
SecGroupID string `q:"security_group_id"`
|
||||||
TenantID string `q:"tenant_id"`
|
TenantID string `q:"tenant_id"`
|
||||||
|
ProjectID string `q:"project_id"`
|
||||||
Limit int `q:"limit"`
|
Limit int `q:"limit"`
|
||||||
Marker string `q:"marker"`
|
Marker string `q:"marker"`
|
||||||
SortKey string `q:"sort_key"`
|
SortKey string `q:"sort_key"`
|
||||||
@ -118,9 +119,9 @@ type CreateOpts struct {
|
|||||||
// specified IP prefix as the source IP address of the IP packet.
|
// specified IP prefix as the source IP address of the IP packet.
|
||||||
RemoteIPPrefix string `json:"remote_ip_prefix,omitempty"`
|
RemoteIPPrefix string `json:"remote_ip_prefix,omitempty"`
|
||||||
|
|
||||||
// The UUID of the tenant who owns the Rule. Only administrative users
|
// TenantID is the UUID of the project who owns the Rule.
|
||||||
// can specify a tenant UUID other than their own.
|
// Only administrative users can specify a project UUID other than their own.
|
||||||
TenantID string `json:"tenant_id,omitempty"`
|
ProjectID string `json:"project_id,omitempty"`
|
||||||
}
|
}
|
||||||
|
|
||||||
// ToSecGroupRuleCreateMap builds a request body from CreateOpts.
|
// ToSecGroupRuleCreateMap builds a request body from CreateOpts.
|
||||||
|
@ -48,8 +48,11 @@ type SecGroupRule struct {
|
|||||||
// matches the specified IP prefix as the source IP address of the IP packet.
|
// matches the specified IP prefix as the source IP address of the IP packet.
|
||||||
RemoteIPPrefix string `json:"remote_ip_prefix"`
|
RemoteIPPrefix string `json:"remote_ip_prefix"`
|
||||||
|
|
||||||
// The owner of this security group rule.
|
// TenantID is the project owner of this security group rule.
|
||||||
TenantID string `json:"tenant_id"`
|
TenantID string `json:"tenant_id"`
|
||||||
|
|
||||||
|
// ProjectID is the project owner of this security group rule.
|
||||||
|
ProjectID string `json:"project_id"`
|
||||||
}
|
}
|
||||||
|
|
||||||
// SecGroupRulePage is the page returned by a pager when traversing over a
|
// SecGroupRulePage is the page returned by a pager when traversing over a
|
||||||
|
@ -21,6 +21,7 @@ type ListOpts struct {
|
|||||||
Name string `q:"name"`
|
Name string `q:"name"`
|
||||||
AdminStateUp *bool `q:"admin_state_up"`
|
AdminStateUp *bool `q:"admin_state_up"`
|
||||||
TenantID string `q:"tenant_id"`
|
TenantID string `q:"tenant_id"`
|
||||||
|
ProjectID string `q:"project_id"`
|
||||||
Shared *bool `q:"shared"`
|
Shared *bool `q:"shared"`
|
||||||
ID string `q:"id"`
|
ID string `q:"id"`
|
||||||
Marker string `q:"marker"`
|
Marker string `q:"marker"`
|
||||||
@ -70,6 +71,7 @@ type CreateOpts struct {
|
|||||||
Name string `json:"name,omitempty"`
|
Name string `json:"name,omitempty"`
|
||||||
Shared *bool `json:"shared,omitempty"`
|
Shared *bool `json:"shared,omitempty"`
|
||||||
TenantID string `json:"tenant_id,omitempty"`
|
TenantID string `json:"tenant_id,omitempty"`
|
||||||
|
ProjectID string `json:"project_id,omitempty"`
|
||||||
AvailabilityZoneHints []string `json:"availability_zone_hints,omitempty"`
|
AvailabilityZoneHints []string `json:"availability_zone_hints,omitempty"`
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -64,9 +64,12 @@ type Network struct {
|
|||||||
// Subnets associated with this network.
|
// Subnets associated with this network.
|
||||||
Subnets []string `json:"subnets"`
|
Subnets []string `json:"subnets"`
|
||||||
|
|
||||||
// Owner of network.
|
// TenantID is the project owner of the network.
|
||||||
TenantID string `json:"tenant_id"`
|
TenantID string `json:"tenant_id"`
|
||||||
|
|
||||||
|
// ProjectID is the project owner of the network.
|
||||||
|
ProjectID string `json:"project_id"`
|
||||||
|
|
||||||
// Specifies whether the network resource can be accessed by any tenant.
|
// Specifies whether the network resource can be accessed by any tenant.
|
||||||
Shared bool `json:"shared"`
|
Shared bool `json:"shared"`
|
||||||
|
|
||||||
|
2
vendor/github.com/gophercloud/gophercloud/openstack/networking/v2/ports/requests.go
generated
vendored
2
vendor/github.com/gophercloud/gophercloud/openstack/networking/v2/ports/requests.go
generated
vendored
@ -22,6 +22,7 @@ type ListOpts struct {
|
|||||||
AdminStateUp *bool `q:"admin_state_up"`
|
AdminStateUp *bool `q:"admin_state_up"`
|
||||||
NetworkID string `q:"network_id"`
|
NetworkID string `q:"network_id"`
|
||||||
TenantID string `q:"tenant_id"`
|
TenantID string `q:"tenant_id"`
|
||||||
|
ProjectID string `q:"project_id"`
|
||||||
DeviceOwner string `q:"device_owner"`
|
DeviceOwner string `q:"device_owner"`
|
||||||
MACAddress string `q:"mac_address"`
|
MACAddress string `q:"mac_address"`
|
||||||
ID string `q:"id"`
|
ID string `q:"id"`
|
||||||
@ -81,6 +82,7 @@ type CreateOpts struct {
|
|||||||
DeviceID string `json:"device_id,omitempty"`
|
DeviceID string `json:"device_id,omitempty"`
|
||||||
DeviceOwner string `json:"device_owner,omitempty"`
|
DeviceOwner string `json:"device_owner,omitempty"`
|
||||||
TenantID string `json:"tenant_id,omitempty"`
|
TenantID string `json:"tenant_id,omitempty"`
|
||||||
|
ProjectID string `json:"project_id,omitempty"`
|
||||||
SecurityGroups *[]string `json:"security_groups,omitempty"`
|
SecurityGroups *[]string `json:"security_groups,omitempty"`
|
||||||
AllowedAddressPairs []AddressPair `json:"allowed_address_pairs,omitempty"`
|
AllowedAddressPairs []AddressPair `json:"allowed_address_pairs,omitempty"`
|
||||||
}
|
}
|
||||||
|
5
vendor/github.com/gophercloud/gophercloud/openstack/networking/v2/ports/results.go
generated
vendored
5
vendor/github.com/gophercloud/gophercloud/openstack/networking/v2/ports/results.go
generated
vendored
@ -84,9 +84,12 @@ type Port struct {
|
|||||||
// the subnets where the IP addresses are picked from
|
// the subnets where the IP addresses are picked from
|
||||||
FixedIPs []IP `json:"fixed_ips"`
|
FixedIPs []IP `json:"fixed_ips"`
|
||||||
|
|
||||||
// Owner of network.
|
// TenantID is the project owner of the port.
|
||||||
TenantID string `json:"tenant_id"`
|
TenantID string `json:"tenant_id"`
|
||||||
|
|
||||||
|
// ProjectID is the project owner of the port.
|
||||||
|
ProjectID string `json:"project_id"`
|
||||||
|
|
||||||
// Identifies the entity (e.g.: dhcp agent) using this port.
|
// Identifies the entity (e.g.: dhcp agent) using this port.
|
||||||
DeviceOwner string `json:"device_owner"`
|
DeviceOwner string `json:"device_owner"`
|
||||||
|
|
||||||
|
51
vendor/github.com/gophercloud/gophercloud/provider_client.go
generated
vendored
51
vendor/github.com/gophercloud/gophercloud/provider_client.go
generated
vendored
@ -126,6 +126,36 @@ func (client *ProviderClient) SetToken(t string) {
|
|||||||
client.TokenID = t
|
client.TokenID = t
|
||||||
}
|
}
|
||||||
|
|
||||||
|
//Reauthenticate calls client.ReauthFunc in a thread-safe way. If this is
|
||||||
|
//called because of a 401 response, the caller may pass the previous token. In
|
||||||
|
//this case, the reauthentication can be skipped if another thread has already
|
||||||
|
//reauthenticated in the meantime. If no previous token is known, an empty
|
||||||
|
//string should be passed instead to force unconditional reauthentication.
|
||||||
|
func (client *ProviderClient) Reauthenticate(previousToken string) (err error) {
|
||||||
|
if client.ReauthFunc == nil {
|
||||||
|
return nil
|
||||||
|
}
|
||||||
|
|
||||||
|
if client.mut == nil {
|
||||||
|
return client.ReauthFunc()
|
||||||
|
}
|
||||||
|
client.mut.Lock()
|
||||||
|
defer client.mut.Unlock()
|
||||||
|
|
||||||
|
client.reauthmut.Lock()
|
||||||
|
client.reauthmut.reauthing = true
|
||||||
|
client.reauthmut.Unlock()
|
||||||
|
|
||||||
|
if previousToken == "" || client.TokenID == previousToken {
|
||||||
|
err = client.ReauthFunc()
|
||||||
|
}
|
||||||
|
|
||||||
|
client.reauthmut.Lock()
|
||||||
|
client.reauthmut.reauthing = false
|
||||||
|
client.reauthmut.Unlock()
|
||||||
|
return
|
||||||
|
}
|
||||||
|
|
||||||
// RequestOpts customizes the behavior of the provider.Request() method.
|
// RequestOpts customizes the behavior of the provider.Request() method.
|
||||||
type RequestOpts struct {
|
type RequestOpts struct {
|
||||||
// JSONBody, if provided, will be encoded as JSON and used as the body of the HTTP request. The
|
// JSONBody, if provided, will be encoded as JSON and used as the body of the HTTP request. The
|
||||||
@ -254,21 +284,7 @@ func (client *ProviderClient) Request(method, url string, options *RequestOpts)
|
|||||||
}
|
}
|
||||||
case http.StatusUnauthorized:
|
case http.StatusUnauthorized:
|
||||||
if client.ReauthFunc != nil {
|
if client.ReauthFunc != nil {
|
||||||
if client.mut != nil {
|
err = client.Reauthenticate(prereqtok)
|
||||||
client.mut.Lock()
|
|
||||||
client.reauthmut.Lock()
|
|
||||||
client.reauthmut.reauthing = true
|
|
||||||
client.reauthmut.Unlock()
|
|
||||||
if curtok := client.TokenID; curtok == prereqtok {
|
|
||||||
err = client.ReauthFunc()
|
|
||||||
}
|
|
||||||
client.reauthmut.Lock()
|
|
||||||
client.reauthmut.reauthing = false
|
|
||||||
client.reauthmut.Unlock()
|
|
||||||
client.mut.Unlock()
|
|
||||||
} else {
|
|
||||||
err = client.ReauthFunc()
|
|
||||||
}
|
|
||||||
if err != nil {
|
if err != nil {
|
||||||
e := &ErrUnableToReauthenticate{}
|
e := &ErrUnableToReauthenticate{}
|
||||||
e.ErrOriginal = respErr
|
e.ErrOriginal = respErr
|
||||||
@ -298,6 +314,11 @@ func (client *ProviderClient) Request(method, url string, options *RequestOpts)
|
|||||||
if error401er, ok := errType.(Err401er); ok {
|
if error401er, ok := errType.(Err401er); ok {
|
||||||
err = error401er.Error401(respErr)
|
err = error401er.Error401(respErr)
|
||||||
}
|
}
|
||||||
|
case http.StatusForbidden:
|
||||||
|
err = ErrDefault403{respErr}
|
||||||
|
if error403er, ok := errType.(Err403er); ok {
|
||||||
|
err = error403er.Error403(respErr)
|
||||||
|
}
|
||||||
case http.StatusNotFound:
|
case http.StatusNotFound:
|
||||||
err = ErrDefault404{respErr}
|
err = ErrDefault404{respErr}
|
||||||
if error404er, ok := errType.(Err404er); ok {
|
if error404er, ok := errType.(Err404er); ok {
|
||||||
|
Loading…
Reference in New Issue
Block a user