build(deps): bump github.com/gophercloud/gophercloud

Bumps [github.com/gophercloud/gophercloud](https://github.com/gophercloud/gophercloud) from 0.24.0 to 1.0.0.
- [Release notes](https://github.com/gophercloud/gophercloud/releases)
- [Changelog](https://github.com/gophercloud/gophercloud/blob/master/CHANGELOG.md)
- [Commits](https://github.com/gophercloud/gophercloud/compare/v0.24.0...v1.0.0)

---
updated-dependencies:
- dependency-name: github.com/gophercloud/gophercloud
  dependency-type: direct:production
  update-type: version-update:semver-major
...

Signed-off-by: dependabot[bot] <support@github.com>
This commit is contained in:
dependabot[bot] 2022-08-30 13:45:04 +00:00 committed by Ondřej Budai
parent 8f26317115
commit c864343770
20 changed files with 174 additions and 603 deletions

View file

@ -412,19 +412,19 @@ func (opts RebootOpts) ToServerRebootMap() (map[string]interface{}, error) {
}
/*
Reboot requests that a given server reboot.
Reboot requests that a given server reboot.
Two methods exist for rebooting a server:
Two methods exist for rebooting a server:
HardReboot (aka PowerCycle) starts the server instance by physically cutting
power to the machine, or if a VM, terminating it at the hypervisor level.
It's done. Caput. Full stop.
Then, after a brief while, power is restored or the VM instance restarted.
HardReboot (aka PowerCycle) starts the server instance by physically cutting
power to the machine, or if a VM, terminating it at the hypervisor level.
It's done. Caput. Full stop.
Then, after a brief while, power is restored or the VM instance restarted.
SoftReboot (aka OSReboot) simply tells the OS to restart under its own
procedure.
E.g., in Linux, asking it to enter runlevel 6, or executing
"sudo shutdown -r now", or by asking Windows to rtart the machine.
SoftReboot (aka OSReboot) simply tells the OS to restart under its own
procedure.
E.g., in Linux, asking it to enter runlevel 6, or executing
"sudo shutdown -r now", or by asking Windows to rtart the machine.
*/
func Reboot(client *gophercloud.ServiceClient, id string, opts RebootOptsBuilder) (r ActionResult) {
b, err := opts.ToServerRebootMap()

View file

@ -99,7 +99,8 @@ type GetPasswordResult struct {
// If privateKey != nil the password is decrypted with the private key.
// If privateKey == nil the encrypted password is returned and can be decrypted
// with:
// echo '<pwd>' | base64 -D | openssl rsautl -decrypt -inkey <private_key>
//
// echo '<pwd>' | base64 -D | openssl rsautl -decrypt -inkey <private_key>
func (r GetPasswordResult) ExtractPassword(privateKey *rsa.PrivateKey) (string, error) {
var s struct {
Password string `json:"password"`

View file

@ -89,7 +89,7 @@ func Create(client *gophercloud.ServiceClient, auth AuthOptionsBuilder) (r Creat
}
resp, err := client.Post(CreateURL(client), b, &r.Body, &gophercloud.RequestOpts{
OkCodes: []int{200, 203},
MoreHeaders: map[string]string{"X-Auth-Token": ""},
OmitHeaders: []string{"X-Auth-Token"},
})
_, r.Header, r.Err = gophercloud.ParseResponse(resp, err)
return

View file

@ -36,6 +36,5 @@ Example to auth a client using EC2 access and secret keys
if err != nil {
panic(err)
}
*/
package ec2tokens

View file

@ -118,6 +118,5 @@ Example to Create a Token using OAuth1 method
if err != nil {
panic(err)
}
*/
package oauth1

View file

@ -103,6 +103,5 @@ Example to Create a Token from a Username and Password with Project Name Scope
if err != nil {
panic(err)
}
*/
package tokens

View file

@ -135,7 +135,7 @@ func Create(c *gophercloud.ServiceClient, opts AuthOptionsBuilder) (r CreateResu
}
resp, err := c.Post(tokenURL(c), b, &r.Body, &gophercloud.RequestOpts{
MoreHeaders: map[string]string{"X-Auth-Token": ""},
OmitHeaders: []string{"X-Auth-Token"},
})
_, r.Header, r.Err = gophercloud.ParseResponse(resp, err)
return

View file

@ -18,18 +18,18 @@ Example to Upload Image Data
Example to Stage Image Data
imageID := "da3b75d9-3f4a-40e7-8a2c-bfab23927dea"
imageID := "da3b75d9-3f4a-40e7-8a2c-bfab23927dea"
imageData, err := os.Open("/path/to/image/file")
if err != nil {
panic(err)
}
defer imageData.Close()
imageData, err := os.Open("/path/to/image/file")
if err != nil {
panic(err)
}
defer imageData.Close()
err = imagedata.Stage(imageClient, imageID, imageData).ExtractErr()
if err != nil {
panic(err)
}
err = imagedata.Stage(imageClient, imageID, imageData).ExtractErr()
if err != nil {
panic(err)
}
Example to Download Image Data