remove not used variables
This commit is contained in:
parent
26030d750c
commit
b909e9d4e6
|
@ -44,7 +44,7 @@ func (s *StepCreateServerImage) createServerImage(serverInstanceNo string) (*ncl
|
||||||
|
|
||||||
memberServerImageList, err := s.Conn.CreateMemberServerImage(reqParams)
|
memberServerImageList, err := s.Conn.CreateMemberServerImage(reqParams)
|
||||||
if err != nil {
|
if err != nil {
|
||||||
return nil, fmt.Errorf("error code: %d , error message: %s", memberServerImageList.ReturnCode, memberServerImageList.ReturnMessage)
|
return nil, err
|
||||||
}
|
}
|
||||||
|
|
||||||
serverImage := memberServerImageList.MemberServerImageList[0]
|
serverImage := memberServerImageList.MemberServerImageList[0]
|
||||||
|
|
|
@ -55,7 +55,7 @@ func (s *StepCreateServerInstance) createServerInstance(loginKeyName string, zon
|
||||||
|
|
||||||
serverInstanceList, err := s.Conn.CreateServerInstances(reqParams)
|
serverInstanceList, err := s.Conn.CreateServerInstances(reqParams)
|
||||||
if err != nil {
|
if err != nil {
|
||||||
return "", fmt.Errorf("error code: %d, error message: %s", serverInstanceList.ReturnCode, serverInstanceList.ReturnMessage)
|
return "", err
|
||||||
}
|
}
|
||||||
|
|
||||||
s.serverInstanceNo = serverInstanceList.ServerInstanceList[0].ServerInstanceNo
|
s.serverInstanceNo = serverInstanceList.ServerInstanceList[0].ServerInstanceNo
|
||||||
|
|
|
@ -63,7 +63,7 @@ func (s *StepDeleteBlockStorageInstance) deleteBlockStorageInstance(serverInstan
|
||||||
return nil
|
return nil
|
||||||
}
|
}
|
||||||
|
|
||||||
result, err := s.Conn.DeleteBlockStorageInstances(blockStorageInstanceList)
|
_, err := s.Conn.DeleteBlockStorageInstances(blockStorageInstanceList)
|
||||||
if err != nil {
|
if err != nil {
|
||||||
return err
|
return err
|
||||||
}
|
}
|
||||||
|
|
|
@ -28,7 +28,7 @@ func NewStepDeleteLoginKey(conn *ncloud.Conn, ui packer.Ui) *StepDeleteLoginKey
|
||||||
}
|
}
|
||||||
|
|
||||||
func (s *StepDeleteLoginKey) deleteLoginKey(keyName string) error {
|
func (s *StepDeleteLoginKey) deleteLoginKey(keyName string) error {
|
||||||
resp, err := s.Conn.DeleteLoginKey(keyName)
|
_, err := s.Conn.DeleteLoginKey(keyName)
|
||||||
if err != nil {
|
if err != nil {
|
||||||
return err
|
return err
|
||||||
}
|
}
|
||||||
|
|
|
@ -1,8 +1,6 @@
|
||||||
package ncloud
|
package ncloud
|
||||||
|
|
||||||
import (
|
import (
|
||||||
"fmt"
|
|
||||||
|
|
||||||
ncloud "github.com/NaverCloudPlatform/ncloud-sdk-go/sdk"
|
ncloud "github.com/NaverCloudPlatform/ncloud-sdk-go/sdk"
|
||||||
"github.com/hashicorp/packer/packer"
|
"github.com/hashicorp/packer/packer"
|
||||||
"github.com/mitchellh/multistep"
|
"github.com/mitchellh/multistep"
|
||||||
|
|
|
@ -2,7 +2,6 @@ package ncloud
|
||||||
|
|
||||||
import (
|
import (
|
||||||
"errors"
|
"errors"
|
||||||
"fmt"
|
|
||||||
"time"
|
"time"
|
||||||
|
|
||||||
ncloud "github.com/NaverCloudPlatform/ncloud-sdk-go/sdk"
|
ncloud "github.com/NaverCloudPlatform/ncloud-sdk-go/sdk"
|
||||||
|
@ -33,7 +32,7 @@ func (s *StepTerminateServerInstance) terminateServerInstance(serverInstanceNo s
|
||||||
reqParams := new(ncloud.RequestTerminateServerInstances)
|
reqParams := new(ncloud.RequestTerminateServerInstances)
|
||||||
reqParams.ServerInstanceNoList = []string{serverInstanceNo}
|
reqParams.ServerInstanceNoList = []string{serverInstanceNo}
|
||||||
|
|
||||||
serverInstanceList, err := s.Conn.TerminateServerInstances(reqParams)
|
_, err := s.Conn.TerminateServerInstances(reqParams)
|
||||||
if err != nil {
|
if err != nil {
|
||||||
return err
|
return err
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in New Issue