fix tests
regenerate code regenerate code, revendor fix website
This commit is contained in:
parent
e04eaa89e6
commit
c4d0c5505a
|
@ -4,6 +4,7 @@ import (
|
|||
"fmt"
|
||||
"testing"
|
||||
|
||||
"github.com/hashicorp/packer/common/commonsteps"
|
||||
"github.com/hashicorp/packer/helper/communicator"
|
||||
"github.com/hashicorp/packer/helper/multistep"
|
||||
"github.com/hashicorp/packer/packer"
|
||||
|
|
|
@ -64,6 +64,7 @@ type FlatConfig struct {
|
|||
CdromType *string `mapstructure:"cdrom_type" cty:"cdrom_type" hcl:"cdrom_type"`
|
||||
ISOPaths []string `mapstructure:"iso_paths" cty:"iso_paths" hcl:"iso_paths"`
|
||||
RemoveCdrom *bool `mapstructure:"remove_cdrom" cty:"remove_cdrom" hcl:"remove_cdrom"`
|
||||
FloppyIMGPath *string `mapstructure:"floppy_img_path" cty:"floppy_img_path" hcl:"floppy_img_path"`
|
||||
FloppyFiles []string `mapstructure:"floppy_files" cty:"floppy_files" hcl:"floppy_files"`
|
||||
FloppyDirectories []string `mapstructure:"floppy_dirs" cty:"floppy_dirs" hcl:"floppy_dirs"`
|
||||
FloppyLabel *string `mapstructure:"floppy_label" cty:"floppy_label" hcl:"floppy_label"`
|
||||
|
@ -200,6 +201,7 @@ func (*FlatConfig) HCL2Spec() map[string]hcldec.Spec {
|
|||
"cdrom_type": &hcldec.AttrSpec{Name: "cdrom_type", Type: cty.String, Required: false},
|
||||
"iso_paths": &hcldec.AttrSpec{Name: "iso_paths", Type: cty.List(cty.String), Required: false},
|
||||
"remove_cdrom": &hcldec.AttrSpec{Name: "remove_cdrom", Type: cty.Bool, Required: false},
|
||||
"floppy_img_path": &hcldec.AttrSpec{Name: "floppy_img_path", Type: cty.String, Required: false},
|
||||
"floppy_files": &hcldec.AttrSpec{Name: "floppy_files", Type: cty.List(cty.String), Required: false},
|
||||
"floppy_dirs": &hcldec.AttrSpec{Name: "floppy_dirs", Type: cty.List(cty.String), Required: false},
|
||||
"floppy_label": &hcldec.AttrSpec{Name: "floppy_label", Type: cty.String, Required: false},
|
||||
|
|
|
@ -69,6 +69,7 @@ type FlatConfig struct {
|
|||
CdromType *string `mapstructure:"cdrom_type" cty:"cdrom_type" hcl:"cdrom_type"`
|
||||
ISOPaths []string `mapstructure:"iso_paths" cty:"iso_paths" hcl:"iso_paths"`
|
||||
RemoveCdrom *bool `mapstructure:"remove_cdrom" cty:"remove_cdrom" hcl:"remove_cdrom"`
|
||||
FloppyIMGPath *string `mapstructure:"floppy_img_path" cty:"floppy_img_path" hcl:"floppy_img_path"`
|
||||
FloppyFiles []string `mapstructure:"floppy_files" cty:"floppy_files" hcl:"floppy_files"`
|
||||
FloppyDirectories []string `mapstructure:"floppy_dirs" cty:"floppy_dirs" hcl:"floppy_dirs"`
|
||||
FloppyLabel *string `mapstructure:"floppy_label" cty:"floppy_label" hcl:"floppy_label"`
|
||||
|
@ -209,6 +210,7 @@ func (*FlatConfig) HCL2Spec() map[string]hcldec.Spec {
|
|||
"cdrom_type": &hcldec.AttrSpec{Name: "cdrom_type", Type: cty.String, Required: false},
|
||||
"iso_paths": &hcldec.AttrSpec{Name: "iso_paths", Type: cty.List(cty.String), Required: false},
|
||||
"remove_cdrom": &hcldec.AttrSpec{Name: "remove_cdrom", Type: cty.Bool, Required: false},
|
||||
"floppy_img_path": &hcldec.AttrSpec{Name: "floppy_img_path", Type: cty.String, Required: false},
|
||||
"floppy_files": &hcldec.AttrSpec{Name: "floppy_files", Type: cty.List(cty.String), Required: false},
|
||||
"floppy_dirs": &hcldec.AttrSpec{Name: "floppy_dirs", Type: cty.List(cty.String), Required: false},
|
||||
"floppy_label": &hcldec.AttrSpec{Name: "floppy_label", Type: cty.String, Required: false},
|
||||
|
|
|
@ -1 +0,0 @@
|
|||
delicious chocolate cake
|
|
@ -14,6 +14,7 @@ import (
|
|||
"strings"
|
||||
"testing"
|
||||
|
||||
"github.com/hashicorp/packer/common/commonsteps"
|
||||
confighelper "github.com/hashicorp/packer/helper/config"
|
||||
"github.com/hashicorp/packer/packer"
|
||||
"github.com/stretchr/testify/assert"
|
||||
|
|
|
@ -11,6 +11,7 @@ import (
|
|||
"testing"
|
||||
"time"
|
||||
|
||||
"github.com/hashicorp/packer/common/commonsteps"
|
||||
"github.com/hashicorp/packer/packer"
|
||||
"github.com/stretchr/testify/assert"
|
||||
)
|
||||
|
|
|
@ -7,6 +7,7 @@ import (
|
|||
"strings"
|
||||
"testing"
|
||||
|
||||
"github.com/hashicorp/packer/common/commonsteps"
|
||||
"github.com/hashicorp/packer/packer"
|
||||
)
|
||||
|
||||
|
|
|
@ -9,6 +9,7 @@ import (
|
|||
"strings"
|
||||
"testing"
|
||||
|
||||
"github.com/hashicorp/packer/common/commonsteps"
|
||||
"github.com/hashicorp/packer/packer"
|
||||
)
|
||||
|
||||
|
|
|
@ -10,6 +10,7 @@
|
|||
package server
|
||||
|
||||
type AddNasVolumeAccessControlResponse struct {
|
||||
|
||||
RequestId *string `json:"requestId,omitempty"`
|
||||
|
||||
ReturnCode *string `json:"returnCode,omitempty"`
|
||||
|
|
|
@ -10,6 +10,7 @@
|
|||
package server
|
||||
|
||||
type AddPortForwardingRulesResponse struct {
|
||||
|
||||
RequestId *string `json:"requestId,omitempty"`
|
||||
|
||||
ReturnCode *string `json:"returnCode,omitempty"`
|
||||
|
|
|
@ -10,6 +10,7 @@
|
|||
package server
|
||||
|
||||
type AssociatePublicIpWithServerInstanceResponse struct {
|
||||
|
||||
RequestId *string `json:"requestId,omitempty"`
|
||||
|
||||
ReturnCode *string `json:"returnCode,omitempty"`
|
||||
|
|
|
@ -10,6 +10,7 @@
|
|||
package server
|
||||
|
||||
type AttachBlockStorageInstanceResponse struct {
|
||||
|
||||
RequestId *string `json:"requestId,omitempty"`
|
||||
|
||||
ReturnCode *string `json:"returnCode,omitempty"`
|
||||
|
|
|
@ -10,6 +10,7 @@
|
|||
package server
|
||||
|
||||
type AttachNetworkInterfaceResponse struct {
|
||||
|
||||
RequestId *string `json:"requestId,omitempty"`
|
||||
|
||||
ReturnCode *string `json:"returnCode,omitempty"`
|
||||
|
|
|
@ -10,6 +10,7 @@
|
|||
package server
|
||||
|
||||
type ChangeNasVolumeSizeResponse struct {
|
||||
|
||||
RequestId *string `json:"requestId,omitempty"`
|
||||
|
||||
ReturnCode *string `json:"returnCode,omitempty"`
|
||||
|
|
|
@ -10,6 +10,7 @@
|
|||
package server
|
||||
|
||||
type ChangeServerInstanceSpecResponse struct {
|
||||
|
||||
RequestId *string `json:"requestId,omitempty"`
|
||||
|
||||
ReturnCode *string `json:"returnCode,omitempty"`
|
||||
|
|
|
@ -10,6 +10,7 @@
|
|||
package server
|
||||
|
||||
type CreateBlockStorageInstanceResponse struct {
|
||||
|
||||
RequestId *string `json:"requestId,omitempty"`
|
||||
|
||||
ReturnCode *string `json:"returnCode,omitempty"`
|
||||
|
|
|
@ -10,6 +10,7 @@
|
|||
package server
|
||||
|
||||
type CreateBlockStorageSnapshotInstanceResponse struct {
|
||||
|
||||
RequestId *string `json:"requestId,omitempty"`
|
||||
|
||||
ReturnCode *string `json:"returnCode,omitempty"`
|
||||
|
|
|
@ -10,6 +10,7 @@
|
|||
package server
|
||||
|
||||
type CreateInstanceTagsResponse struct {
|
||||
|
||||
RequestId *string `json:"requestId,omitempty"`
|
||||
|
||||
ReturnCode *string `json:"returnCode,omitempty"`
|
||||
|
|
|
@ -10,6 +10,7 @@
|
|||
package server
|
||||
|
||||
type CreateLoginKeyResponse struct {
|
||||
|
||||
RequestId *string `json:"requestId,omitempty"`
|
||||
|
||||
ReturnCode *string `json:"returnCode,omitempty"`
|
||||
|
|
|
@ -10,6 +10,7 @@
|
|||
package server
|
||||
|
||||
type CreateMemberServerImageResponse struct {
|
||||
|
||||
RequestId *string `json:"requestId,omitempty"`
|
||||
|
||||
ReturnCode *string `json:"returnCode,omitempty"`
|
||||
|
|
|
@ -10,6 +10,7 @@
|
|||
package server
|
||||
|
||||
type CreateNasVolumeInstanceResponse struct {
|
||||
|
||||
RequestId *string `json:"requestId,omitempty"`
|
||||
|
||||
ReturnCode *string `json:"returnCode,omitempty"`
|
||||
|
|
|
@ -10,6 +10,7 @@
|
|||
package server
|
||||
|
||||
type CreateNetworkInterfaceResponse struct {
|
||||
|
||||
RequestId *string `json:"requestId,omitempty"`
|
||||
|
||||
ReturnCode *string `json:"returnCode,omitempty"`
|
||||
|
|
|
@ -10,6 +10,7 @@
|
|||
package server
|
||||
|
||||
type CreatePublicIpInstanceResponse struct {
|
||||
|
||||
RequestId *string `json:"requestId,omitempty"`
|
||||
|
||||
ReturnCode *string `json:"returnCode,omitempty"`
|
||||
|
|
|
@ -10,6 +10,7 @@
|
|||
package server
|
||||
|
||||
type CreateServerInstancesResponse struct {
|
||||
|
||||
RequestId *string `json:"requestId,omitempty"`
|
||||
|
||||
ReturnCode *string `json:"returnCode,omitempty"`
|
||||
|
|
|
@ -10,6 +10,7 @@
|
|||
package server
|
||||
|
||||
type DeleteBlockStorageInstancesResponse struct {
|
||||
|
||||
RequestId *string `json:"requestId,omitempty"`
|
||||
|
||||
ReturnCode *string `json:"returnCode,omitempty"`
|
||||
|
|
|
@ -10,6 +10,7 @@
|
|||
package server
|
||||
|
||||
type DeleteBlockStorageSnapshotInstancesResponse struct {
|
||||
|
||||
RequestId *string `json:"requestId,omitempty"`
|
||||
|
||||
ReturnCode *string `json:"returnCode,omitempty"`
|
||||
|
|
|
@ -10,6 +10,7 @@
|
|||
package server
|
||||
|
||||
type DeleteInstanceTagsResponse struct {
|
||||
|
||||
RequestId *string `json:"requestId,omitempty"`
|
||||
|
||||
ReturnCode *string `json:"returnCode,omitempty"`
|
||||
|
|
|
@ -10,6 +10,7 @@
|
|||
package server
|
||||
|
||||
type DeleteLoginKeyResponse struct {
|
||||
|
||||
RequestId *string `json:"requestId,omitempty"`
|
||||
|
||||
ReturnCode *string `json:"returnCode,omitempty"`
|
||||
|
|
|
@ -10,6 +10,7 @@
|
|||
package server
|
||||
|
||||
type DeleteMemberServerImagesResponse struct {
|
||||
|
||||
RequestId *string `json:"requestId,omitempty"`
|
||||
|
||||
ReturnCode *string `json:"returnCode,omitempty"`
|
||||
|
|
|
@ -10,6 +10,7 @@
|
|||
package server
|
||||
|
||||
type DeleteNasVolumeInstanceResponse struct {
|
||||
|
||||
RequestId *string `json:"requestId,omitempty"`
|
||||
|
||||
ReturnCode *string `json:"returnCode,omitempty"`
|
||||
|
|
|
@ -10,6 +10,7 @@
|
|||
package server
|
||||
|
||||
type DeleteNetworkInterfaceResponse struct {
|
||||
|
||||
RequestId *string `json:"requestId,omitempty"`
|
||||
|
||||
ReturnCode *string `json:"returnCode,omitempty"`
|
||||
|
|
|
@ -10,6 +10,7 @@
|
|||
package server
|
||||
|
||||
type DeletePublicIpInstancesResponse struct {
|
||||
|
||||
RequestId *string `json:"requestId,omitempty"`
|
||||
|
||||
ReturnCode *string `json:"returnCode,omitempty"`
|
||||
|
|
|
@ -10,6 +10,7 @@
|
|||
package server
|
||||
|
||||
type DetachBlockStorageInstancesResponse struct {
|
||||
|
||||
RequestId *string `json:"requestId,omitempty"`
|
||||
|
||||
ReturnCode *string `json:"returnCode,omitempty"`
|
||||
|
|
|
@ -10,6 +10,7 @@
|
|||
package server
|
||||
|
||||
type DetachNetworkInterfaceResponse struct {
|
||||
|
||||
RequestId *string `json:"requestId,omitempty"`
|
||||
|
||||
ReturnCode *string `json:"returnCode,omitempty"`
|
||||
|
|
|
@ -10,6 +10,7 @@
|
|||
package server
|
||||
|
||||
type DisassociatePublicIpFromServerInstanceResponse struct {
|
||||
|
||||
RequestId *string `json:"requestId,omitempty"`
|
||||
|
||||
ReturnCode *string `json:"returnCode,omitempty"`
|
||||
|
|
|
@ -10,6 +10,7 @@
|
|||
package server
|
||||
|
||||
type GetAccessControlGroupListResponse struct {
|
||||
|
||||
RequestId *string `json:"requestId,omitempty"`
|
||||
|
||||
ReturnCode *string `json:"returnCode,omitempty"`
|
||||
|
|
|
@ -10,6 +10,7 @@
|
|||
package server
|
||||
|
||||
type GetAccessControlGroupServerInstanceListResponse struct {
|
||||
|
||||
RequestId *string `json:"requestId,omitempty"`
|
||||
|
||||
ReturnCode *string `json:"returnCode,omitempty"`
|
||||
|
|
|
@ -10,6 +10,7 @@
|
|||
package server
|
||||
|
||||
type GetAccessControlRuleListResponse struct {
|
||||
|
||||
RequestId *string `json:"requestId,omitempty"`
|
||||
|
||||
ReturnCode *string `json:"returnCode,omitempty"`
|
||||
|
|
|
@ -10,6 +10,7 @@
|
|||
package server
|
||||
|
||||
type GetBlockStorageInstanceListResponse struct {
|
||||
|
||||
RequestId *string `json:"requestId,omitempty"`
|
||||
|
||||
ReturnCode *string `json:"returnCode,omitempty"`
|
||||
|
|
|
@ -10,6 +10,7 @@
|
|||
package server
|
||||
|
||||
type GetBlockStorageSnapshotInstanceListResponse struct {
|
||||
|
||||
RequestId *string `json:"requestId,omitempty"`
|
||||
|
||||
ReturnCode *string `json:"returnCode,omitempty"`
|
||||
|
|
|
@ -10,6 +10,7 @@
|
|||
package server
|
||||
|
||||
type GetInstanceTagListResponse struct {
|
||||
|
||||
RequestId *string `json:"requestId,omitempty"`
|
||||
|
||||
ReturnCode *string `json:"returnCode,omitempty"`
|
||||
|
|
|
@ -10,6 +10,7 @@
|
|||
package server
|
||||
|
||||
type GetLoginKeyListResponse struct {
|
||||
|
||||
RequestId *string `json:"requestId,omitempty"`
|
||||
|
||||
ReturnCode *string `json:"returnCode,omitempty"`
|
||||
|
|
|
@ -10,6 +10,7 @@
|
|||
package server
|
||||
|
||||
type GetMemberServerImageListResponse struct {
|
||||
|
||||
RequestId *string `json:"requestId,omitempty"`
|
||||
|
||||
ReturnCode *string `json:"returnCode,omitempty"`
|
||||
|
|
|
@ -10,6 +10,7 @@
|
|||
package server
|
||||
|
||||
type GetNasVolumeInstanceListResponse struct {
|
||||
|
||||
RequestId *string `json:"requestId,omitempty"`
|
||||
|
||||
ReturnCode *string `json:"returnCode,omitempty"`
|
||||
|
|
|
@ -10,6 +10,7 @@
|
|||
package server
|
||||
|
||||
type GetNasVolumeInstanceRatingListResponse struct {
|
||||
|
||||
RequestId *string `json:"requestId,omitempty"`
|
||||
|
||||
ReturnCode *string `json:"returnCode,omitempty"`
|
||||
|
|
|
@ -10,6 +10,7 @@
|
|||
package server
|
||||
|
||||
type GetNetworkInterfaceListResponse struct {
|
||||
|
||||
RequestId *string `json:"requestId,omitempty"`
|
||||
|
||||
ReturnCode *string `json:"returnCode,omitempty"`
|
||||
|
|
|
@ -10,6 +10,7 @@
|
|||
package server
|
||||
|
||||
type GetPrivateSubnetInstanceListResponse struct {
|
||||
|
||||
RequestId *string `json:"requestId,omitempty"`
|
||||
|
||||
ReturnCode *string `json:"returnCode,omitempty"`
|
||||
|
|
|
@ -10,6 +10,7 @@
|
|||
package server
|
||||
|
||||
type GetPublicIpInstanceListResponse struct {
|
||||
|
||||
RequestId *string `json:"requestId,omitempty"`
|
||||
|
||||
ReturnCode *string `json:"returnCode,omitempty"`
|
||||
|
|
|
@ -10,6 +10,7 @@
|
|||
package server
|
||||
|
||||
type GetPublicIpTargetServerInstanceListResponse struct {
|
||||
|
||||
RequestId *string `json:"requestId,omitempty"`
|
||||
|
||||
ReturnCode *string `json:"returnCode,omitempty"`
|
||||
|
|
|
@ -10,6 +10,7 @@
|
|||
package server
|
||||
|
||||
type GetRaidListResponse struct {
|
||||
|
||||
RequestId *string `json:"requestId,omitempty"`
|
||||
|
||||
ReturnCode *string `json:"returnCode,omitempty"`
|
||||
|
|
|
@ -10,6 +10,7 @@
|
|||
package server
|
||||
|
||||
type GetRegionListResponse struct {
|
||||
|
||||
RequestId *string `json:"requestId,omitempty"`
|
||||
|
||||
ReturnCode *string `json:"returnCode,omitempty"`
|
||||
|
|
|
@ -10,6 +10,7 @@
|
|||
package server
|
||||
|
||||
type GetRootPasswordResponse struct {
|
||||
|
||||
RequestId *string `json:"requestId,omitempty"`
|
||||
|
||||
ReturnCode *string `json:"returnCode,omitempty"`
|
||||
|
|
|
@ -10,6 +10,7 @@
|
|||
package server
|
||||
|
||||
type GetServerImageProductListResponse struct {
|
||||
|
||||
RequestId *string `json:"requestId,omitempty"`
|
||||
|
||||
ReturnCode *string `json:"returnCode,omitempty"`
|
||||
|
|
|
@ -10,6 +10,7 @@
|
|||
package server
|
||||
|
||||
type GetServerInstanceListResponse struct {
|
||||
|
||||
RequestId *string `json:"requestId,omitempty"`
|
||||
|
||||
ReturnCode *string `json:"returnCode,omitempty"`
|
||||
|
|
|
@ -10,6 +10,7 @@
|
|||
package server
|
||||
|
||||
type GetServerProductListResponse struct {
|
||||
|
||||
RequestId *string `json:"requestId,omitempty"`
|
||||
|
||||
ReturnCode *string `json:"returnCode,omitempty"`
|
||||
|
|
|
@ -10,6 +10,7 @@
|
|||
package server
|
||||
|
||||
type GetZoneListResponse struct {
|
||||
|
||||
RequestId *string `json:"requestId,omitempty"`
|
||||
|
||||
ReturnCode *string `json:"returnCode,omitempty"`
|
||||
|
|
|
@ -10,6 +10,7 @@
|
|||
package server
|
||||
|
||||
type ImportLoginKeyResponse struct {
|
||||
|
||||
RequestId *string `json:"requestId,omitempty"`
|
||||
|
||||
ReturnCode *string `json:"returnCode,omitempty"`
|
||||
|
|
|
@ -10,6 +10,7 @@
|
|||
package server
|
||||
|
||||
type RebootServerInstancesResponse struct {
|
||||
|
||||
RequestId *string `json:"requestId,omitempty"`
|
||||
|
||||
ReturnCode *string `json:"returnCode,omitempty"`
|
||||
|
|
|
@ -10,6 +10,7 @@
|
|||
package server
|
||||
|
||||
type RecreateServerInstanceResponse struct {
|
||||
|
||||
RequestId *string `json:"requestId,omitempty"`
|
||||
|
||||
ReturnCode *string `json:"returnCode,omitempty"`
|
||||
|
|
1
vendor/github.com/NaverCloudPlatform/ncloud-sdk-go-v2/services/server/region.go
generated
vendored
1
vendor/github.com/NaverCloudPlatform/ncloud-sdk-go-v2/services/server/region.go
generated
vendored
|
@ -10,6 +10,7 @@
|
|||
package server
|
||||
|
||||
type Region struct {
|
||||
|
||||
RegionNo *string `json:"regionNo,omitempty"`
|
||||
|
||||
RegionCode *string `json:"regionCode,omitempty"`
|
||||
|
|
|
@ -10,6 +10,7 @@
|
|||
package server
|
||||
|
||||
type RemoveNasVolumeAccessControlResponse struct {
|
||||
|
||||
RequestId *string `json:"requestId,omitempty"`
|
||||
|
||||
ReturnCode *string `json:"returnCode,omitempty"`
|
||||
|
|
|
@ -10,6 +10,7 @@
|
|||
package server
|
||||
|
||||
type SetNasVolumeAccessControlResponse struct {
|
||||
|
||||
RequestId *string `json:"requestId,omitempty"`
|
||||
|
||||
ReturnCode *string `json:"returnCode,omitempty"`
|
||||
|
|
|
@ -10,6 +10,7 @@
|
|||
package server
|
||||
|
||||
type StartServerInstancesResponse struct {
|
||||
|
||||
RequestId *string `json:"requestId,omitempty"`
|
||||
|
||||
ReturnCode *string `json:"returnCode,omitempty"`
|
||||
|
|
|
@ -10,6 +10,7 @@
|
|||
package server
|
||||
|
||||
type StopServerInstancesResponse struct {
|
||||
|
||||
RequestId *string `json:"requestId,omitempty"`
|
||||
|
||||
ReturnCode *string `json:"returnCode,omitempty"`
|
||||
|
|
|
@ -10,6 +10,7 @@
|
|||
package server
|
||||
|
||||
type TerminateServerInstancesResponse struct {
|
||||
|
||||
RequestId *string `json:"requestId,omitempty"`
|
||||
|
||||
ReturnCode *string `json:"returnCode,omitempty"`
|
||||
|
|
410
vendor/github.com/NaverCloudPlatform/ncloud-sdk-go-v2/services/server/v2_api.go
generated
vendored
410
vendor/github.com/NaverCloudPlatform/ncloud-sdk-go-v2/services/server/v2_api.go
generated
vendored
File diff suppressed because it is too large
Load Diff
2
vendor/github.com/aliyun/alibaba-cloud-sdk-go/sdk/endpoints/endpoints_config.go
generated
vendored
2
vendor/github.com/aliyun/alibaba-cloud-sdk-go/sdk/endpoints/endpoints_config.go
generated
vendored
|
@ -1,3 +1,4 @@
|
|||
|
||||
package endpoints
|
||||
|
||||
import (
|
||||
|
@ -1655,7 +1656,6 @@ const endpointsJson = `{
|
|||
}
|
||||
]
|
||||
}`
|
||||
|
||||
var initOnce sync.Once
|
||||
var data interface{}
|
||||
|
||||
|
|
|
@ -41,7 +41,6 @@ var debug utils.Debug
|
|||
func init() {
|
||||
debug = utils.Init("sdk")
|
||||
}
|
||||
|
||||
// Unmarshal object from http response body to target Response
|
||||
func Unmarshal(response AcsResponse, httpResponse *http.Response, format string) (err error) {
|
||||
err = response.parseFromHttpResponse(httpResponse)
|
||||
|
|
|
@ -867,6 +867,7 @@ const (
|
|||
// ProcDomainSetIothreadParams is libvirt's REMOTE_PROC_DOMAIN_SET_IOTHREAD_PARAMS
|
||||
ProcDomainSetIothreadParams = 402
|
||||
|
||||
|
||||
// From consts:
|
||||
// StringMax is libvirt's REMOTE_STRING_MAX
|
||||
StringMax = 4194304
|
||||
|
|
File diff suppressed because it is too large
Load Diff
|
@ -10,17 +10,14 @@ type (
|
|||
prev *node
|
||||
}
|
||||
)
|
||||
|
||||
// Create a new stack
|
||||
func New() *Stack {
|
||||
return &Stack{nil,0}
|
||||
}
|
||||
|
||||
// Return the number of items in the stack
|
||||
func (this *Stack) Len() int {
|
||||
return this.length
|
||||
}
|
||||
|
||||
// View the top item on the stack
|
||||
func (this *Stack) Peek() interface{} {
|
||||
if this.length == 0 {
|
||||
|
@ -28,7 +25,6 @@ func (this *Stack) Peek() interface{} {
|
|||
}
|
||||
return this.top.value
|
||||
}
|
||||
|
||||
// Pop the top item of the stack and return it
|
||||
func (this *Stack) Pop() interface{} {
|
||||
if this.length == 0 {
|
||||
|
@ -40,7 +36,6 @@ func (this *Stack) Pop() interface{} {
|
|||
this.length--
|
||||
return n.value
|
||||
}
|
||||
|
||||
// Push a value onto the top of the stack
|
||||
func (this *Stack) Push(value interface{}) {
|
||||
n := &node{value,this.top}
|
||||
|
|
|
@ -1214,7 +1214,7 @@ func parseDefaultIfNameFromIPCmd(routeOut string) (string, error) {
|
|||
// Android.
|
||||
func parseDefaultIfNameFromIPCmdAndroid(routeOut string) (string, error) {
|
||||
parsedLines := parseIfNameFromIPCmd(routeOut)
|
||||
if len(parsedLines) > 0 {
|
||||
if (len(parsedLines) > 0) {
|
||||
ifName := strings.TrimSpace(parsedLines[0][4])
|
||||
return ifName, nil
|
||||
}
|
||||
|
@ -1222,6 +1222,7 @@ func parseDefaultIfNameFromIPCmdAndroid(routeOut string) (string, error) {
|
|||
return "", errors.New("No default interface found")
|
||||
}
|
||||
|
||||
|
||||
// parseIfNameFromIPCmd parses interfaces from ip(8) for
|
||||
// Linux.
|
||||
func parseIfNameFromIPCmd(routeOut string) [][]string {
|
||||
|
|
|
@ -25,6 +25,7 @@ func (ri routeInfo) GetDefaultInterfaceName() (string, error) {
|
|||
return "", err
|
||||
}
|
||||
|
||||
|
||||
var ifName string
|
||||
if ifName, err = parseDefaultIfNameFromIPCmdAndroid(string(out)); err != nil {
|
||||
return "", errors.New("No default interface found")
|
||||
|
|
|
@ -24,6 +24,7 @@ func GenerateRandomBytesWithReader(size int, reader io.Reader) ([]byte, error) {
|
|||
return buf, nil
|
||||
}
|
||||
|
||||
|
||||
const uuidLen = 16
|
||||
|
||||
// GenerateUUID is used to generate a random UUID
|
||||
|
|
|
@ -29,3 +29,4 @@ const (
|
|||
HeaderJdcloudPrefix = "x-jdcloud"
|
||||
HeaderJdcloudRequestId = "x-jdcloud-request-id"
|
||||
)
|
||||
|
||||
|
|
|
@ -15,12 +15,12 @@
|
|||
package core
|
||||
|
||||
import (
|
||||
"encoding/base64"
|
||||
"encoding/json"
|
||||
"fmt"
|
||||
"net/http"
|
||||
"strings"
|
||||
"time"
|
||||
"fmt"
|
||||
"encoding/json"
|
||||
"encoding/base64"
|
||||
)
|
||||
|
||||
// JDCloudClient is the base struct of service clients
|
||||
|
|
|
@ -40,3 +40,4 @@ func (logger DefaultLogger) Log(level int, message ...interface{}) {
|
|||
fmt.Println(message...)
|
||||
}
|
||||
}
|
||||
|
||||
|
|
|
@ -16,12 +16,12 @@ package core
|
|||
|
||||
import (
|
||||
"encoding/json"
|
||||
"errors"
|
||||
"fmt"
|
||||
urllib "net/url"
|
||||
"reflect"
|
||||
"regexp"
|
||||
"strings"
|
||||
"errors"
|
||||
"reflect"
|
||||
urllib "net/url"
|
||||
)
|
||||
|
||||
var baseRequestFields []string
|
||||
|
|
|
@ -1,10 +1,10 @@
|
|||
package core
|
||||
|
||||
import (
|
||||
"net/http"
|
||||
"io/ioutil"
|
||||
"errors"
|
||||
"fmt"
|
||||
"io/ioutil"
|
||||
"net/http"
|
||||
)
|
||||
|
||||
type ResponseProcessor interface {
|
||||
|
|
|
@ -17,18 +17,18 @@
|
|||
package core
|
||||
|
||||
import (
|
||||
"bytes"
|
||||
"crypto/hmac"
|
||||
"crypto/sha256"
|
||||
"encoding/hex"
|
||||
"fmt"
|
||||
"github.com/gofrs/uuid"
|
||||
"io"
|
||||
"net/http"
|
||||
"net/url"
|
||||
"sort"
|
||||
"strings"
|
||||
"time"
|
||||
"bytes"
|
||||
"github.com/gofrs/uuid"
|
||||
)
|
||||
|
||||
const (
|
||||
|
@ -56,6 +56,7 @@ func init() {
|
|||
}
|
||||
}
|
||||
|
||||
|
||||
type Signer struct {
|
||||
Credentials Credential
|
||||
Logger Logger
|
||||
|
|
|
@ -16,6 +16,7 @@
|
|||
|
||||
package models
|
||||
|
||||
|
||||
type Charge struct {
|
||||
|
||||
/* 支付模式,取值为:prepaid_by_duration,postpaid_by_usage或postpaid_by_duration,prepaid_by_duration表示预付费,postpaid_by_usage表示按用量后付费,postpaid_by_duration表示按配置后付费,默认为postpaid_by_duration (Optional) */
|
||||
|
|
1
vendor/github.com/jdcloud-api/jdcloud-sdk-go/services/charge/models/ChargeSpec.go
generated
vendored
1
vendor/github.com/jdcloud-api/jdcloud-sdk-go/services/charge/models/ChargeSpec.go
generated
vendored
|
@ -16,6 +16,7 @@
|
|||
|
||||
package models
|
||||
|
||||
|
||||
type ChargeSpec struct {
|
||||
|
||||
/* 计费模式,取值为:prepaid_by_duration,postpaid_by_usage或postpaid_by_duration,prepaid_by_duration表示预付费,postpaid_by_usage表示按用量后付费,postpaid_by_duration表示按配置后付费,默认为postpaid_by_duration (Optional) */
|
||||
|
|
|
@ -16,6 +16,7 @@
|
|||
|
||||
package models
|
||||
|
||||
|
||||
type Filter struct {
|
||||
|
||||
/* 过滤条件的名称 */
|
||||
|
|
Some files were not shown because too many files have changed in this diff Show More
Loading…
Reference in New Issue