Commit e18f0f7f authored by Vasiliy Tolstov's avatar Vasiliy Tolstov

fix missing parts

Signed-off-by: default avatarVasiliy Tolstov <v.tolstov@selfip.ru>
parent 4166c637
......@@ -2,6 +2,7 @@ package digitalocean
import (
"fmt"
"github.com/mitchellh/multistep"
"github.com/mitchellh/packer/packer"
)
......@@ -53,7 +54,7 @@ func (s *stepCreateDroplet) Cleanup(state multistep.StateBag) {
err := client.DestroyDroplet(s.dropletId)
if err != nil {
curlstr := fmt.Sprintf("curl '%v/droplets/%v/destroy?client_id=%v&api_key=%v'",
DIGITALOCEAN_API_URL, s.dropletId, c.ClientID, c.APIKey)
c.APIURL, s.dropletId, c.ClientID, c.APIKey)
ui.Error(fmt.Sprintf(
"Error destroying droplet. Please destroy it manually: %v", curlstr))
......
package digitalocean
import (
"code.google.com/p/gosshold/ssh"
"crypto/rand"
"crypto/rsa"
"crypto/x509"
"encoding/pem"
"fmt"
"log"
"code.google.com/p/gosshold/ssh"
"github.com/mitchellh/multistep"
"github.com/mitchellh/packer/common/uuid"
"github.com/mitchellh/packer/packer"
"log"
)
type stepCreateSSHKey struct {
......@@ -78,7 +79,7 @@ func (s *stepCreateSSHKey) Cleanup(state multistep.StateBag) {
err := client.DestroyKey(s.keyId)
curlstr := fmt.Sprintf("curl '%v/ssh_keys/%v/destroy?client_id=%v&api_key=%v'",
DIGITALOCEAN_API_URL, s.keyId, c.ClientID, c.APIKey)
c.APIURL, s.keyId, c.ClientID, c.APIKey)
if err != nil {
log.Printf("Error cleaning up ssh key: %v", err.Error())
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment