From fd21b669db06b816093bfbc5b44be3a9ecc2492d Mon Sep 17 00:00:00 2001 From: Vaijanath Angadihiremath Date: Tue, 10 Mar 2020 00:16:38 -0700 Subject: [PATCH] Fixing the linting errors now required for merging --- builder/azure/dtl/azure_error_response.go | 4 - builder/azure/dtl/builder.go | 18 -- builder/azure/dtl/builder_test.go | 2 +- builder/azure/dtl/config.go | 55 +--- builder/azure/dtl/config_test.go | 209 +++++++-------- builder/azure/dtl/openssh_key_pair_test.go | 2 +- builder/azure/dtl/step_deploy_template.go | 1 - .../step_publish_to_shared_image_gallery.go | 1 + builder/azure/dtl/step_save_winrm_password.go | 8 +- builder/azure/dtl/template_factory.go | 45 ---- command/plugin.go | 246 +++++++++--------- go.sum | 1 + vendor/modules.txt | 6 + 13 files changed, 253 insertions(+), 345 deletions(-) diff --git a/builder/azure/dtl/azure_error_response.go b/builder/azure/dtl/azure_error_response.go index ec6354ea3..2d92f101e 100644 --- a/builder/azure/dtl/azure_error_response.go +++ b/builder/azure/dtl/azure_error_response.go @@ -30,10 +30,6 @@ func (e *azureErrorDetails) isEmpty() bool { return e.Code == "" } -func (e *azureErrorResponse) isEmpty() bool { - return e.ErrorDetails.isEmpty() -} - func (e *azureErrorResponse) Error() string { var buf bytes.Buffer //buf.WriteString("-=-=- ERROR -=-=-") diff --git a/builder/azure/dtl/builder.go b/builder/azure/dtl/builder.go index 68a1cf286..421188b48 100644 --- a/builder/azure/dtl/builder.go +++ b/builder/azure/dtl/builder.go @@ -10,7 +10,6 @@ import ( "strings" dtl "github.com/Azure/azure-sdk-for-go/services/devtestlabs/mgmt/2018-09-15/dtl" - armstorage "github.com/Azure/azure-sdk-for-go/services/storage/mgmt/2017-10-01/storage" "github.com/Azure/go-autorest/autorest/adal" "github.com/dgrijalva/jwt-go" @@ -283,23 +282,6 @@ func (b *Builder) writeSSHPrivateKey(ui packer.Ui, debugKeyPath string) { } } -func equalLocation(location1, location2 string) bool { - return strings.EqualFold(canonicalizeLocation(location1), canonicalizeLocation(location2)) -} - -func canonicalizeLocation(location string) string { - return strings.Replace(location, " ", "", -1) -} - -func (b *Builder) getBlobAccount(ctx context.Context, client *AzureClient, resourceGroupName string, storageAccountName string) (*armstorage.Account, error) { - account, err := client.AccountsClient.GetProperties(ctx, resourceGroupName, storageAccountName) - if err != nil { - return nil, err - } - - return &account, err -} - func (b *Builder) configureStateBag(stateBag multistep.StateBag) { stateBag.Put(constants.AuthorizedKey, b.config.sshAuthorizedKey) diff --git a/builder/azure/dtl/builder_test.go b/builder/azure/dtl/builder_test.go index 7456be9ce..c3318e7ab 100644 --- a/builder/azure/dtl/builder_test.go +++ b/builder/azure/dtl/builder_test.go @@ -8,7 +8,7 @@ import ( func TestStateBagShouldBePopulatedExpectedValues(t *testing.T) { var testSubject = &Builder{} - _, _, err := testSubject.Prepare(getArmBuilderConfiguration(), getPackerConfiguration()) + _, _, err := testSubject.Prepare(getDtlBuilderConfiguration(), getPackerConfiguration()) if err != nil { t.Fatalf("failed to prepare: %s", err) } diff --git a/builder/azure/dtl/config.go b/builder/azure/dtl/config.go index 46b44618a..f819c3fc3 100644 --- a/builder/azure/dtl/config.go +++ b/builder/azure/dtl/config.go @@ -25,7 +25,6 @@ import ( "github.com/hashicorp/packer/builder/azure/pkcs12" "github.com/hashicorp/packer/common" - commonhelper "github.com/hashicorp/packer/helper/common" "github.com/hashicorp/packer/helper/communicator" "github.com/hashicorp/packer/helper/config" "github.com/hashicorp/packer/packer" @@ -49,17 +48,15 @@ const ( // -> ^[^_\W][\w-._]{0,79}(? 0 { return nil, nil, errs @@ -502,9 +490,13 @@ func setWinRMCertificate(c *Config) error { func setRuntimeValues(c *Config) { var tempName = NewTempName(c) +<<<<<<< HEAD c.tmpAdminPassword = "Packer~1" //tempName.AdminPassword // store so that we can access this later during provisioning commonhelper.SetSharedState("winrm_password", c.tmpAdminPassword, c.PackerConfig.PackerBuildName) +======= + c.tmpAdminPassword = tempName.AdminPassword +>>>>>>> Fixing the linting errors now required for merging packer.LogSecretFilter.Set(c.tmpAdminPassword) c.tmpCertificatePassword = "Packer~1" //tempName.CertificatePassword @@ -554,8 +546,6 @@ func provideDefaultValues(c *Config) { if c.ImagePublisher != "" && c.ImageVersion == "" { c.ImageVersion = DefaultImageVersion } - - c.ClientConfig.SetDefaultValues() } func assertTagProperties(c *Config, errs *packer.MultiError) { @@ -736,17 +726,6 @@ func assertRequiredParametersSet(c *Config, errs *packer.MultiError) { default: errs = packer.MultiErrorAppend(errs, fmt.Errorf("The managed_image_storage_account_type %q is invalid", c.ManagedImageStorageAccountType)) } - - switch c.DiskCachingType { - case string(compute.CachingTypesNone): - c.diskCachingType = compute.CachingTypesNone - case string(compute.CachingTypesReadOnly): - c.diskCachingType = compute.CachingTypesReadOnly - case "", string(compute.CachingTypesReadWrite): - c.diskCachingType = compute.CachingTypesReadWrite - default: - errs = packer.MultiErrorAppend(errs, fmt.Errorf("The disk_caching_type %q is invalid", c.DiskCachingType)) - } } func assertManagedImageName(name, setting string) (bool, error) { @@ -756,20 +735,6 @@ func assertManagedImageName(name, setting string) (bool, error) { return true, nil } -func assertManagedImageOSDiskSnapshotName(name, setting string) (bool, error) { - if !isValidAzureName(reSnapshotName, name) { - return false, fmt.Errorf("The setting %s must only contain characters from a-z, A-Z, 0-9 and _ and the maximum length is 80 characters", setting) - } - return true, nil -} - -func assertManagedImageDataDiskSnapshotName(name, setting string) (bool, error) { - if !isValidAzureName(reSnapshotPrefix, name) { - return false, fmt.Errorf("The setting %s must only contain characters from a-z, A-Z, 0-9 and _ and the maximum length (excluding the prefix) is 60 characters", setting) - } - return true, nil -} - func assertResourceGroupName(rgn, setting string) (bool, error) { if !isValidAzureName(reResourceGroupName, rgn) { return false, fmt.Errorf("The setting %s must match the regular expression %q, and not end with a '-' or '.'.", setting, validResourceGroupNameRe) diff --git a/builder/azure/dtl/config_test.go b/builder/azure/dtl/config_test.go index 32305a4d6..b260f1de3 100644 --- a/builder/azure/dtl/config_test.go +++ b/builder/azure/dtl/config_test.go @@ -8,7 +8,7 @@ import ( "github.com/hashicorp/packer/builder/azure/common/constants" ) -// List of configuration parameters that are required by the ARM builder. +// List of configuration parameters that are required by the DTL builder. var requiredConfigValues = []string{ "capture_name_prefix", "capture_container_name", @@ -20,10 +20,12 @@ var requiredConfigValues = []string{ "location", "os_type", "subscription_id", + "lab_resource_group_name", + "lab_virtual_network_name", } func TestConfigShouldProvideReasonableDefaultValues(t *testing.T) { - c, _, err := newConfig(getArmBuilderConfiguration(), getPackerConfiguration()) + c, _, err := newConfig(getDtlBuilderConfiguration(), getPackerConfiguration()) if err != nil { t.Error("Expected configuration creation to succeed, but it failed!\n") @@ -52,7 +54,7 @@ func TestConfigShouldProvideReasonableDefaultValues(t *testing.T) { } func TestConfigShouldDefaultVMSizeToStandardA1(t *testing.T) { - c, _, _ := newConfig(getArmBuilderConfiguration(), getPackerConfiguration()) + c, _, _ := newConfig(getDtlBuilderConfiguration(), getPackerConfiguration()) if c.VMSize != "Standard_A1" { t.Errorf("Expected 'VMSize' to default to 'Standard_A1', but got '%s'.", c.VMSize) @@ -60,30 +62,13 @@ func TestConfigShouldDefaultVMSizeToStandardA1(t *testing.T) { } func TestConfigShouldDefaultImageVersionToLatest(t *testing.T) { - c, _, _ := newConfig(getArmBuilderConfiguration(), getPackerConfiguration()) + c, _, _ := newConfig(getDtlBuilderConfiguration(), getPackerConfiguration()) if c.ImageVersion != "latest" { t.Errorf("Expected 'ImageVersion' to default to 'latest', but got '%s'.", c.ImageVersion) } } -func TestConfigShouldNotDefaultImageVersionIfCustomImage(t *testing.T) { - config := map[string]string{ - "capture_name_prefix": "ignore", - "capture_container_name": "ignore", - "location": "ignore", - "image_url": "ignore", - "subscription_id": "ignore", - "os_type": constants.Target_Linux, - "communicator": "none", - } - - c, _, _ := newConfig(config, getPackerConfiguration()) - if c.ImageVersion != "" { - t.Errorf("Expected 'ImageVersion' to empty, but got '%s'.", c.ImageVersion) - } -} - // The user can pass the value virtual_network_resource_group_name to avoid the lookup of // a virtual network's resource group, or to help with disambiguation. The value should // only be set if virtual_network_name was set. @@ -127,7 +112,7 @@ func TestConfigVirtualNetworkSubnetNameMustBeSetWithVirtualNetworkName(t *testin } func TestSystemShouldDefineRuntimeValues(t *testing.T) { - c, _, _ := newConfig(getArmBuilderConfiguration(), getPackerConfiguration()) + c, _, _ := newConfig(getDtlBuilderConfiguration(), getPackerConfiguration()) if c.Password == "" { t.Errorf("Expected Password to not be empty, but it was '%s'!", c.Password) @@ -151,7 +136,7 @@ func TestSystemShouldDefineRuntimeValues(t *testing.T) { } func TestConfigShouldTransformToVirtualMachineCaptureParameters(t *testing.T) { - c, _, _ := newConfig(getArmBuilderConfiguration(), getPackerConfiguration()) + c, _, _ := newConfig(getDtlBuilderConfiguration(), getPackerConfiguration()) parameters := c.toVirtualMachineCaptureParameters() if *parameters.DestinationContainerName != c.CaptureContainerName { @@ -169,7 +154,7 @@ func TestConfigShouldTransformToVirtualMachineCaptureParameters(t *testing.T) { func TestConfigShouldSupportPackersConfigElements(t *testing.T) { c, _, err := newConfig( - getArmBuilderConfiguration(), + getDtlBuilderConfiguration(), getPackerConfiguration(), getPackerCommunicatorConfiguration()) @@ -187,7 +172,7 @@ func TestConfigShouldSupportPackersConfigElements(t *testing.T) { } func TestWinRMConfigShouldSetRoundTripDecorator(t *testing.T) { - config := getArmBuilderConfiguration() + config := getDtlBuilderConfiguration() config["communicator"] = "winrm" config["winrm_username"] = "username" config["winrm_password"] = "password" @@ -204,15 +189,17 @@ func TestWinRMConfigShouldSetRoundTripDecorator(t *testing.T) { func TestUserDeviceLoginIsEnabledForLinux(t *testing.T) { config := map[string]string{ - "capture_name_prefix": "ignore", - "capture_container_name": "ignore", - "image_offer": "ignore", - "image_publisher": "ignore", - "image_sku": "ignore", - "location": "ignore", - "subscription_id": "ignore", - "os_type": constants.Target_Linux, - "communicator": "none", + "capture_name_prefix": "ignore", + "capture_container_name": "ignore", + "image_offer": "ignore", + "image_publisher": "ignore", + "image_sku": "ignore", + "location": "ignore", + "subscription_id": "ignore", + "os_type": constants.Target_Linux, + "communicator": "none", + "lab_resource_group_name": "ignore", + "lab_virtual_network_name": "ignore", } _, _, err := newConfig(config, getPackerConfiguration()) @@ -223,14 +210,16 @@ func TestUserDeviceLoginIsEnabledForLinux(t *testing.T) { func TestConfigShouldAcceptTags(t *testing.T) { config := map[string]interface{}{ - "capture_name_prefix": "ignore", - "capture_container_name": "ignore", - "image_offer": "ignore", - "image_publisher": "ignore", - "image_sku": "ignore", - "location": "ignore", - "subscription_id": "ignore", - "communicator": "none", + "capture_name_prefix": "ignore", + "capture_container_name": "ignore", + "image_offer": "ignore", + "image_publisher": "ignore", + "image_sku": "ignore", + "location": "ignore", + "subscription_id": "ignore", + "communicator": "none", + "lab_resource_group_name": "ignore", + "lab_virtual_network_name": "ignore", // Does not matter for this test case, just pick one. "os_type": constants.Target_Linux, "azure_tags": map[string]string{ @@ -274,14 +263,16 @@ func TestConfigShouldRejectTagsInExcessOf15AcceptTags(t *testing.T) { } config := map[string]interface{}{ - "capture_name_prefix": "ignore", - "capture_container_name": "ignore", - "image_offer": "ignore", - "image_publisher": "ignore", - "image_sku": "ignore", - "location": "ignore", - "subscription_id": "ignore", - "communicator": "none", + "capture_name_prefix": "ignore", + "capture_container_name": "ignore", + "image_offer": "ignore", + "image_publisher": "ignore", + "image_sku": "ignore", + "location": "ignore", + "subscription_id": "ignore", + "communicator": "none", + "lab_resource_group_name": "ignore", + "lab_virtual_network_name": "ignore", // Does not matter for this test case, just pick one. "os_type": constants.Target_Linux, "azure_tags": tooManyTags, @@ -304,14 +295,16 @@ func TestConfigShouldRejectExcessiveTagNameLength(t *testing.T) { tags[string(nameTooLong)] = "ignored" config := map[string]interface{}{ - "capture_name_prefix": "ignore", - "capture_container_name": "ignore", - "image_offer": "ignore", - "image_publisher": "ignore", - "image_sku": "ignore", - "location": "ignore", - "subscription_id": "ignore", - "communicator": "none", + "capture_name_prefix": "ignore", + "capture_container_name": "ignore", + "image_offer": "ignore", + "image_publisher": "ignore", + "image_sku": "ignore", + "location": "ignore", + "subscription_id": "ignore", + "communicator": "none", + "lab_resource_group_name": "ignore", + "lab_virtual_network_name": "ignore", // Does not matter for this test case, just pick one. "os_type": constants.Target_Linux, "azure_tags": tags, @@ -333,14 +326,16 @@ func TestConfigShouldRejectExcessiveTagValueLength(t *testing.T) { tags["tag01"] = string(valueTooLong) config := map[string]interface{}{ - "capture_name_prefix": "ignore", - "capture_container_name": "ignore", - "image_offer": "ignore", - "image_publisher": "ignore", - "image_sku": "ignore", - "location": "ignore", - "subscription_id": "ignore", - "communicator": "none", + "capture_name_prefix": "ignore", + "capture_container_name": "ignore", + "image_offer": "ignore", + "image_publisher": "ignore", + "image_sku": "ignore", + "location": "ignore", + "subscription_id": "ignore", + "communicator": "none", + "lab_resource_group_name": "ignore", + "lab_virtual_network_name": "ignore", // Does not matter for this test case, just pick one. "os_type": constants.Target_Linux, "azure_tags": tags, @@ -362,6 +357,8 @@ func TestConfigShouldAcceptPlatformManagedImageBuild(t *testing.T) { "communicator": "none", "managed_image_resource_group_name": "ignore", "managed_image_name": "ignore", + "lab_resource_group_name": "ignore", + "lab_virtual_network_name": "ignore", // Does not matter for this test case, just pick one. "os_type": constants.Target_Linux, @@ -382,6 +379,8 @@ func TestConfigShouldAcceptManagedImageStorageAccountTypes(t *testing.T) { "communicator": "none", "managed_image_resource_group_name": "ignore", "managed_image_name": "ignore", + "lab_resource_group_name": "ignore", + "lab_virtual_network_name": "ignore", // Does not matter for this test case, just pick one. "os_type": constants.Target_Linux, @@ -407,6 +406,8 @@ func TestConfigShouldAcceptDiskCachingTypes(t *testing.T) { "communicator": "none", "managed_image_resource_group_name": "ignore", "managed_image_name": "ignore", + "lab_resource_group_name": "ignore", + "lab_virtual_network_name": "ignore", // Does not matter for this test case, just pick one. "os_type": constants.Target_Linux, @@ -425,14 +426,16 @@ func TestConfigShouldAcceptDiskCachingTypes(t *testing.T) { func TestConfigShouldRejectTempAndBuildResourceGroupName(t *testing.T) { config := map[string]interface{}{ - "capture_name_prefix": "ignore", - "capture_container_name": "ignore", - "image_offer": "ignore", - "image_publisher": "ignore", - "image_sku": "ignore", - "location": "ignore", - "subscription_id": "ignore", - "communicator": "none", + "capture_name_prefix": "ignore", + "capture_container_name": "ignore", + "image_offer": "ignore", + "image_publisher": "ignore", + "image_sku": "ignore", + "location": "ignore", + "subscription_id": "ignore", + "communicator": "none", + "lab_resource_group_name": "ignore", + "lab_virtual_network_name": "ignore", // custom may define one or the other, but not both "temp_resource_group_name": "rgn00", @@ -446,7 +449,7 @@ func TestConfigShouldRejectTempAndBuildResourceGroupName(t *testing.T) { } func TestConfigAdditionalDiskDefaultIsNil(t *testing.T) { - c, _, _ := newConfig(getArmBuilderConfiguration(), getPackerConfiguration()) + c, _, _ := newConfig(getDtlBuilderConfiguration(), getPackerConfiguration()) if c.AdditionalDiskSize != nil { t.Errorf("Expected Config to not have a set of additional disks, but got a non nil value") } @@ -454,13 +457,15 @@ func TestConfigAdditionalDiskDefaultIsNil(t *testing.T) { func TestConfigAdditionalDiskOverrideDefault(t *testing.T) { config := map[string]string{ - "capture_name_prefix": "ignore", - "capture_container_name": "ignore", - "location": "ignore", - "image_url": "ignore", - "subscription_id": "ignore", - "os_type": constants.Target_Linux, - "communicator": "none", + "capture_name_prefix": "ignore", + "capture_container_name": "ignore", + "location": "ignore", + "image_url": "ignore", + "subscription_id": "ignore", + "os_type": constants.Target_Linux, + "communicator": "none", + "lab_resource_group_name": "ignore", + "lab_virtual_network_name": "ignore", } diskconfig := map[string][]int32{ @@ -494,6 +499,8 @@ func TestConfigShouldAllowAsyncResourceGroupOverride(t *testing.T) { "managed_image_name": "ignore", "managed_image_resource_group_name": "ignore", "async_resourcegroup_delete": "true", + "lab_resource_group_name": "ignore", + "lab_virtual_network_name": "ignore", } c, _, err := newConfig(config, getPackerConfiguration()) @@ -516,6 +523,8 @@ func TestConfigShouldAllowAsyncResourceGroupOverrideNoValue(t *testing.T) { "os_type": "linux", "managed_image_name": "ignore", "managed_image_resource_group_name": "ignore", + "lab_resource_group_name": "ignore", + "lab_virtual_network_name": "ignore", } c, _, err := newConfig(config, getPackerConfiguration()) @@ -539,6 +548,8 @@ func TestConfigShouldAllowAsyncResourceGroupOverrideBadValue(t *testing.T) { "managed_image_name": "ignore", "managed_image_resource_group_name": "ignore", "async_resourcegroup_delete": "asdasda", + "lab_resource_group_name": "ignore", + "lab_virtual_network_name": "ignore", } c, _, err := newConfig(config, getPackerConfiguration()) @@ -550,9 +561,11 @@ func TestConfigShouldAllowAsyncResourceGroupOverrideBadValue(t *testing.T) { } func TestConfigShouldAllowSharedImageGalleryOptions(t *testing.T) { config := map[string]interface{}{ - "location": "ignore", - "subscription_id": "ignore", - "os_type": "linux", + "location": "ignore", + "subscription_id": "ignore", + "os_type": "linux", + "lab_resource_group_name": "ignore", + "lab_virtual_network_name": "ignore", "shared_image_gallery": map[string]string{ "subscription": "ignore", "resource_group": "ignore", @@ -581,10 +594,12 @@ func TestConfigShouldRejectSharedImageGalleryWithVhdTarget(t *testing.T) { "image_name": "ignore", "image_version": "ignore", }, - "resource_group_name": "ignore", - "storage_account": "ignore", - "capture_container_name": "ignore", - "capture_name_prefix": "ignore", + "resource_group_name": "ignore", + "storage_account": "ignore", + "capture_container_name": "ignore", + "capture_name_prefix": "ignore", + "lab_resource_group_name": "ignore", + "lab_virtual_network_name": "ignore", } _, _, err := newConfig(config, getPackerConfiguration()) @@ -593,7 +608,7 @@ func TestConfigShouldRejectSharedImageGalleryWithVhdTarget(t *testing.T) { } } -func getArmBuilderConfiguration() map[string]string { +func getDtlBuilderConfiguration() map[string]string { m := make(map[string]string) for _, v := range requiredConfigValues { m[v] = "ignored00" @@ -604,20 +619,6 @@ func getArmBuilderConfiguration() map[string]string { return m } -func getArmBuilderConfigurationWithWindows() map[string]string { - m := make(map[string]string) - for _, v := range requiredConfigValues { - m[v] = "ignored00" - } - - m["object_id"] = "ignored00" - m["tenant_id"] = "ignored00" - m["winrm_username"] = "ignored00" - m["communicator"] = "winrm" - m["os_type"] = constants.Target_Windows - return m -} - func getPackerConfiguration() interface{} { config := map[string]interface{}{ "packer_build_name": "azure-arm-vm", diff --git a/builder/azure/dtl/openssh_key_pair_test.go b/builder/azure/dtl/openssh_key_pair_test.go index dccb7daf7..d4aa6e94d 100644 --- a/builder/azure/dtl/openssh_key_pair_test.go +++ b/builder/azure/dtl/openssh_key_pair_test.go @@ -30,7 +30,7 @@ func TestPrivateKeyShouldParse(t *testing.T) { t.Fatalf("Failed to create a new OpenSSH key pair, err=%s.", err) } - _, err = ssh.ParsePrivateKey([]byte(testSubject.PrivateKey())) + _, err = ssh.ParsePrivateKey(testSubject.PrivateKey()) if err != nil { t.Fatalf("Failed to parse the private key, err=%s\n", err) } diff --git a/builder/azure/dtl/step_deploy_template.go b/builder/azure/dtl/step_deploy_template.go index 8699404e8..b9a394069 100644 --- a/builder/azure/dtl/step_deploy_template.go +++ b/builder/azure/dtl/step_deploy_template.go @@ -193,5 +193,4 @@ func (s *StepDeployTemplate) Cleanup(state multistep.StateBag) { //Only clean up if this was an existing resource group and the resource group //is marked as created // Just return now - return } diff --git a/builder/azure/dtl/step_publish_to_shared_image_gallery.go b/builder/azure/dtl/step_publish_to_shared_image_gallery.go index 703e55599..3ed56794e 100644 --- a/builder/azure/dtl/step_publish_to_shared_image_gallery.go +++ b/builder/azure/dtl/step_publish_to_shared_image_gallery.go @@ -3,6 +3,7 @@ package dtl import ( "context" "fmt" + "github.com/Azure/azure-sdk-for-go/services/compute/mgmt/2019-03-01/compute" "github.com/hashicorp/packer/builder/azure/common/constants" "github.com/hashicorp/packer/helper/multistep" diff --git a/builder/azure/dtl/step_save_winrm_password.go b/builder/azure/dtl/step_save_winrm_password.go index f986300fc..006bd5c49 100644 --- a/builder/azure/dtl/step_save_winrm_password.go +++ b/builder/azure/dtl/step_save_winrm_password.go @@ -3,6 +3,7 @@ package dtl import ( "context" + "github.com/hashicorp/packer/builder/azure/common/constants" commonhelper "github.com/hashicorp/packer/helper/common" "github.com/hashicorp/packer/helper/multistep" "github.com/hashicorp/packer/packer" @@ -15,7 +16,12 @@ type StepSaveWinRMPassword struct { func (s *StepSaveWinRMPassword) Run(ctx context.Context, state multistep.StateBag) multistep.StepAction { // store so that we can access this later during provisioning - commonhelper.SetSharedState("winrm_password", s.Password, s.BuildName) + err := commonhelper.SetSharedState("winrm_password", s.Password, s.BuildName) + if err != nil { + state.Put(constants.Error, err) + + return multistep.ActionHalt + } packer.LogSecretFilter.Set(s.Password) return multistep.ActionContinue } diff --git a/builder/azure/dtl/template_factory.go b/builder/azure/dtl/template_factory.go index 9250102ef..08faf74ee 100644 --- a/builder/azure/dtl/template_factory.go +++ b/builder/azure/dtl/template_factory.go @@ -1,32 +1,14 @@ package dtl import ( - "encoding/json" "fmt" "strings" "github.com/Azure/azure-sdk-for-go/services/devtestlabs/mgmt/2018-09-15/dtl" - "github.com/Azure/azure-sdk-for-go/services/resources/mgmt/2018-02-01/resources" - "github.com/hashicorp/packer/builder/azure/common/template" ) type templateFactoryFuncDtl func(*Config) (*dtl.LabVirtualMachineCreationParameter, error) -func GetKeyVaultDeployment(config *Config) (*resources.Deployment, error) { - params := &template.TemplateParameters{ - KeyVaultName: &template.TemplateParameter{Value: config.tmpKeyVaultName}, - KeyVaultSecretValue: &template.TemplateParameter{Value: config.winrmCertificate}, - ObjectId: &template.TemplateParameter{Value: config.ClientConfig.ObjectID}, - TenantId: &template.TemplateParameter{Value: config.ClientConfig.TenantID}, - } - - builder, _ := template.NewTemplateBuilder(template.KeyVault) - builder.SetTags(&config.AzureTags) - - doc, _ := builder.ToJSON() - return createDeploymentParameters(*doc, params) -} - func newBool(val bool) *bool { b := true if val == b { @@ -152,30 +134,3 @@ func GetVirtualMachineDeployment(config *Config) (*dtl.LabVirtualMachineCreation return labMachine, nil } - -func createDeploymentParameters(doc string, parameters *template.TemplateParameters) (*resources.Deployment, error) { - var template map[string]interface{} - err := json.Unmarshal(([]byte)(doc), &template) - if err != nil { - return nil, err - } - - bs, err := json.Marshal(*parameters) - if err != nil { - return nil, err - } - - var templateParameters map[string]interface{} - err = json.Unmarshal(bs, &templateParameters) - if err != nil { - return nil, err - } - - return &resources.Deployment{ - Properties: &resources.DeploymentProperties{ - Mode: resources.Incremental, - Template: &template, - Parameters: &templateParameters, - }, - }, nil -} diff --git a/command/plugin.go b/command/plugin.go index 8cc7ec011..fa57737a7 100644 --- a/command/plugin.go +++ b/command/plugin.go @@ -14,50 +14,27 @@ import ( "github.com/hashicorp/packer/packer/plugin" alicloudecsbuilder "github.com/hashicorp/packer/builder/alicloud/ecs" - alicloudimportpostprocessor "github.com/hashicorp/packer/post-processor/alicloud-import" amazonchrootbuilder "github.com/hashicorp/packer/builder/amazon/chroot" amazonebsbuilder "github.com/hashicorp/packer/builder/amazon/ebs" amazonebssurrogatebuilder "github.com/hashicorp/packer/builder/amazon/ebssurrogate" amazonebsvolumebuilder "github.com/hashicorp/packer/builder/amazon/ebsvolume" - amazonimportpostprocessor "github.com/hashicorp/packer/post-processor/amazon-import" amazoninstancebuilder "github.com/hashicorp/packer/builder/amazon/instance" - ansiblelocalprovisioner "github.com/hashicorp/packer/provisioner/ansible-local" - ansibleprovisioner "github.com/hashicorp/packer/provisioner/ansible" - artificepostprocessor "github.com/hashicorp/packer/post-processor/artifice" azurearmbuilder "github.com/hashicorp/packer/builder/azure/arm" azurechrootbuilder "github.com/hashicorp/packer/builder/azure/chroot" - azuredtlartifactprovisioner "github.com/hashicorp/packer/provisioner/azure-dtlartifact" azuredtlbuilder "github.com/hashicorp/packer/builder/azure/dtl" - breakpointprovisioner "github.com/hashicorp/packer/provisioner/breakpoint" - checksumpostprocessor "github.com/hashicorp/packer/post-processor/checksum" - chefclientprovisioner "github.com/hashicorp/packer/provisioner/chef-client" - chefsoloprovisioner "github.com/hashicorp/packer/provisioner/chef-solo" cloudstackbuilder "github.com/hashicorp/packer/builder/cloudstack" - compresspostprocessor "github.com/hashicorp/packer/post-processor/compress" - convergeprovisioner "github.com/hashicorp/packer/provisioner/converge" digitaloceanbuilder "github.com/hashicorp/packer/builder/digitalocean" - digitaloceanimportpostprocessor "github.com/hashicorp/packer/post-processor/digitalocean-import" dockerbuilder "github.com/hashicorp/packer/builder/docker" - dockerimportpostprocessor "github.com/hashicorp/packer/post-processor/docker-import" - dockerpushpostprocessor "github.com/hashicorp/packer/post-processor/docker-push" - dockersavepostprocessor "github.com/hashicorp/packer/post-processor/docker-save" - dockertagpostprocessor "github.com/hashicorp/packer/post-processor/docker-tag" - exoscaleimportpostprocessor "github.com/hashicorp/packer/post-processor/exoscale-import" filebuilder "github.com/hashicorp/packer/builder/file" - fileprovisioner "github.com/hashicorp/packer/provisioner/file" googlecomputebuilder "github.com/hashicorp/packer/builder/googlecompute" - googlecomputeexportpostprocessor "github.com/hashicorp/packer/post-processor/googlecompute-export" - googlecomputeimportpostprocessor "github.com/hashicorp/packer/post-processor/googlecompute-import" hcloudbuilder "github.com/hashicorp/packer/builder/hcloud" hyperonebuilder "github.com/hashicorp/packer/builder/hyperone" hypervisobuilder "github.com/hashicorp/packer/builder/hyperv/iso" hypervvmcxbuilder "github.com/hashicorp/packer/builder/hyperv/vmcx" - inspecprovisioner "github.com/hashicorp/packer/provisioner/inspec" jdcloudbuilder "github.com/hashicorp/packer/builder/jdcloud" linodebuilder "github.com/hashicorp/packer/builder/linode" lxcbuilder "github.com/hashicorp/packer/builder/lxc" lxdbuilder "github.com/hashicorp/packer/builder/lxd" - manifestpostprocessor "github.com/hashicorp/packer/post-processor/manifest" ncloudbuilder "github.com/hashicorp/packer/builder/ncloud" nullbuilder "github.com/hashicorp/packer/builder/null" oneandonebuilder "github.com/hashicorp/packer/builder/oneandone" @@ -70,25 +47,14 @@ import ( oscchrootbuilder "github.com/hashicorp/packer/builder/osc/chroot" parallelsisobuilder "github.com/hashicorp/packer/builder/parallels/iso" parallelspvmbuilder "github.com/hashicorp/packer/builder/parallels/pvm" - powershellprovisioner "github.com/hashicorp/packer/provisioner/powershell" profitbricksbuilder "github.com/hashicorp/packer/builder/profitbricks" proxmoxbuilder "github.com/hashicorp/packer/builder/proxmox" - puppetmasterlessprovisioner "github.com/hashicorp/packer/provisioner/puppet-masterless" - puppetserverprovisioner "github.com/hashicorp/packer/provisioner/puppet-server" qemubuilder "github.com/hashicorp/packer/builder/qemu" - saltmasterlessprovisioner "github.com/hashicorp/packer/provisioner/salt-masterless" scalewaybuilder "github.com/hashicorp/packer/builder/scaleway" - shelllocalpostprocessor "github.com/hashicorp/packer/post-processor/shell-local" - shelllocalprovisioner "github.com/hashicorp/packer/provisioner/shell-local" - shellprovisioner "github.com/hashicorp/packer/provisioner/shell" - sleepprovisioner "github.com/hashicorp/packer/provisioner/sleep" tencentcloudcvmbuilder "github.com/hashicorp/packer/builder/tencentcloud/cvm" tritonbuilder "github.com/hashicorp/packer/builder/triton" - ucloudimportpostprocessor "github.com/hashicorp/packer/post-processor/ucloud-import" uclouduhostbuilder "github.com/hashicorp/packer/builder/ucloud/uhost" vagrantbuilder "github.com/hashicorp/packer/builder/vagrant" - vagrantcloudpostprocessor "github.com/hashicorp/packer/post-processor/vagrant-cloud" - vagrantpostprocessor "github.com/hashicorp/packer/post-processor/vagrant" virtualboxisobuilder "github.com/hashicorp/packer/builder/virtualbox/iso" virtualboxovfbuilder "github.com/hashicorp/packer/builder/virtualbox/ovf" virtualboxvmbuilder "github.com/hashicorp/packer/builder/virtualbox/vm" @@ -96,12 +62,45 @@ import ( vmwarevmxbuilder "github.com/hashicorp/packer/builder/vmware/vmx" vsphereclonebuilder "github.com/hashicorp/packer/builder/vsphere/clone" vsphereisobuilder "github.com/hashicorp/packer/builder/vsphere/iso" + yandexbuilder "github.com/hashicorp/packer/builder/yandex" + alicloudimportpostprocessor "github.com/hashicorp/packer/post-processor/alicloud-import" + amazonimportpostprocessor "github.com/hashicorp/packer/post-processor/amazon-import" + artificepostprocessor "github.com/hashicorp/packer/post-processor/artifice" + checksumpostprocessor "github.com/hashicorp/packer/post-processor/checksum" + compresspostprocessor "github.com/hashicorp/packer/post-processor/compress" + digitaloceanimportpostprocessor "github.com/hashicorp/packer/post-processor/digitalocean-import" + dockerimportpostprocessor "github.com/hashicorp/packer/post-processor/docker-import" + dockerpushpostprocessor "github.com/hashicorp/packer/post-processor/docker-push" + dockersavepostprocessor "github.com/hashicorp/packer/post-processor/docker-save" + dockertagpostprocessor "github.com/hashicorp/packer/post-processor/docker-tag" + exoscaleimportpostprocessor "github.com/hashicorp/packer/post-processor/exoscale-import" + googlecomputeexportpostprocessor "github.com/hashicorp/packer/post-processor/googlecompute-export" + googlecomputeimportpostprocessor "github.com/hashicorp/packer/post-processor/googlecompute-import" + manifestpostprocessor "github.com/hashicorp/packer/post-processor/manifest" + shelllocalpostprocessor "github.com/hashicorp/packer/post-processor/shell-local" + ucloudimportpostprocessor "github.com/hashicorp/packer/post-processor/ucloud-import" + vagrantpostprocessor "github.com/hashicorp/packer/post-processor/vagrant" + vagrantcloudpostprocessor "github.com/hashicorp/packer/post-processor/vagrant-cloud" vspherepostprocessor "github.com/hashicorp/packer/post-processor/vsphere" vspheretemplatepostprocessor "github.com/hashicorp/packer/post-processor/vsphere-template" + ansibleprovisioner "github.com/hashicorp/packer/provisioner/ansible" + ansiblelocalprovisioner "github.com/hashicorp/packer/provisioner/ansible-local" + azuredtlartifactprovisioner "github.com/hashicorp/packer/provisioner/azure-dtlartifact" + breakpointprovisioner "github.com/hashicorp/packer/provisioner/breakpoint" + chefclientprovisioner "github.com/hashicorp/packer/provisioner/chef-client" + chefsoloprovisioner "github.com/hashicorp/packer/provisioner/chef-solo" + convergeprovisioner "github.com/hashicorp/packer/provisioner/converge" + fileprovisioner "github.com/hashicorp/packer/provisioner/file" + inspecprovisioner "github.com/hashicorp/packer/provisioner/inspec" + powershellprovisioner "github.com/hashicorp/packer/provisioner/powershell" + puppetmasterlessprovisioner "github.com/hashicorp/packer/provisioner/puppet-masterless" + puppetserverprovisioner "github.com/hashicorp/packer/provisioner/puppet-server" + saltmasterlessprovisioner "github.com/hashicorp/packer/provisioner/salt-masterless" + shellprovisioner "github.com/hashicorp/packer/provisioner/shell" + shelllocalprovisioner "github.com/hashicorp/packer/provisioner/shell-local" + sleepprovisioner "github.com/hashicorp/packer/provisioner/sleep" windowsrestartprovisioner "github.com/hashicorp/packer/provisioner/windows-restart" windowsshellprovisioner "github.com/hashicorp/packer/provisioner/windows-shell" - yandexbuilder "github.com/hashicorp/packer/builder/yandex" - ) type PluginCommand struct { @@ -109,105 +108,102 @@ type PluginCommand struct { } var Builders = map[string]packer.Builder{ - "alicloud-ecs": new(alicloudecsbuilder.Builder), - "amazon-chroot": new(amazonchrootbuilder.Builder), - "amazon-ebs": new(amazonebsbuilder.Builder), - "amazon-ebssurrogate": new(amazonebssurrogatebuilder.Builder), - "amazon-ebsvolume": new(amazonebsvolumebuilder.Builder), - "amazon-instance": new(amazoninstancebuilder.Builder), - "azure-arm": new(azurearmbuilder.Builder), - "azure-chroot": new(azurechrootbuilder.Builder), - "azure-dtl": new(azuredtlbuilder.Builder), - "cloudstack": new(cloudstackbuilder.Builder), - "digitalocean": new(digitaloceanbuilder.Builder), - "docker": new(dockerbuilder.Builder), - "file": new(filebuilder.Builder), - "googlecompute": new(googlecomputebuilder.Builder), - "hcloud": new(hcloudbuilder.Builder), - "hyperone": new(hyperonebuilder.Builder), - "hyperv-iso": new(hypervisobuilder.Builder), - "hyperv-vmcx": new(hypervvmcxbuilder.Builder), - "jdcloud": new(jdcloudbuilder.Builder), - "linode": new(linodebuilder.Builder), - "lxc": new(lxcbuilder.Builder), - "lxd": new(lxdbuilder.Builder), - "ncloud": new(ncloudbuilder.Builder), - "null": new(nullbuilder.Builder), - "oneandone": new(oneandonebuilder.Builder), - "openstack": new(openstackbuilder.Builder), - "oracle-classic": new(oracleclassicbuilder.Builder), - "oracle-oci": new(oracleocibuilder.Builder), - "osc-bsu": new(oscbsubuilder.Builder), - "osc-bsusurrogate": new(oscbsusurrogatebuilder.Builder), - "osc-bsuvolume": new(oscbsuvolumebuilder.Builder), - "osc-chroot": new(oscchrootbuilder.Builder), - "parallels-iso": new(parallelsisobuilder.Builder), - "parallels-pvm": new(parallelspvmbuilder.Builder), - "profitbricks": new(profitbricksbuilder.Builder), - "proxmox": new(proxmoxbuilder.Builder), - "qemu": new(qemubuilder.Builder), - "scaleway": new(scalewaybuilder.Builder), - "tencentcloud-cvm": new(tencentcloudcvmbuilder.Builder), - "triton": new(tritonbuilder.Builder), - "ucloud-uhost": new(uclouduhostbuilder.Builder), - "vagrant": new(vagrantbuilder.Builder), - "virtualbox-iso": new(virtualboxisobuilder.Builder), - "virtualbox-ovf": new(virtualboxovfbuilder.Builder), - "virtualbox-vm": new(virtualboxvmbuilder.Builder), - "vmware-iso": new(vmwareisobuilder.Builder), - "vmware-vmx": new(vmwarevmxbuilder.Builder), - "vsphere-clone": new(vsphereclonebuilder.Builder), - "vsphere-iso": new(vsphereisobuilder.Builder), - "yandex": new(yandexbuilder.Builder), + "alicloud-ecs": new(alicloudecsbuilder.Builder), + "amazon-chroot": new(amazonchrootbuilder.Builder), + "amazon-ebs": new(amazonebsbuilder.Builder), + "amazon-ebssurrogate": new(amazonebssurrogatebuilder.Builder), + "amazon-ebsvolume": new(amazonebsvolumebuilder.Builder), + "amazon-instance": new(amazoninstancebuilder.Builder), + "azure-arm": new(azurearmbuilder.Builder), + "azure-chroot": new(azurechrootbuilder.Builder), + "azure-dtl": new(azuredtlbuilder.Builder), + "cloudstack": new(cloudstackbuilder.Builder), + "digitalocean": new(digitaloceanbuilder.Builder), + "docker": new(dockerbuilder.Builder), + "file": new(filebuilder.Builder), + "googlecompute": new(googlecomputebuilder.Builder), + "hcloud": new(hcloudbuilder.Builder), + "hyperone": new(hyperonebuilder.Builder), + "hyperv-iso": new(hypervisobuilder.Builder), + "hyperv-vmcx": new(hypervvmcxbuilder.Builder), + "jdcloud": new(jdcloudbuilder.Builder), + "linode": new(linodebuilder.Builder), + "lxc": new(lxcbuilder.Builder), + "lxd": new(lxdbuilder.Builder), + "ncloud": new(ncloudbuilder.Builder), + "null": new(nullbuilder.Builder), + "oneandone": new(oneandonebuilder.Builder), + "openstack": new(openstackbuilder.Builder), + "oracle-classic": new(oracleclassicbuilder.Builder), + "oracle-oci": new(oracleocibuilder.Builder), + "osc-bsu": new(oscbsubuilder.Builder), + "osc-bsusurrogate": new(oscbsusurrogatebuilder.Builder), + "osc-bsuvolume": new(oscbsuvolumebuilder.Builder), + "osc-chroot": new(oscchrootbuilder.Builder), + "parallels-iso": new(parallelsisobuilder.Builder), + "parallels-pvm": new(parallelspvmbuilder.Builder), + "profitbricks": new(profitbricksbuilder.Builder), + "proxmox": new(proxmoxbuilder.Builder), + "qemu": new(qemubuilder.Builder), + "scaleway": new(scalewaybuilder.Builder), + "tencentcloud-cvm": new(tencentcloudcvmbuilder.Builder), + "triton": new(tritonbuilder.Builder), + "ucloud-uhost": new(uclouduhostbuilder.Builder), + "vagrant": new(vagrantbuilder.Builder), + "virtualbox-iso": new(virtualboxisobuilder.Builder), + "virtualbox-ovf": new(virtualboxovfbuilder.Builder), + "virtualbox-vm": new(virtualboxvmbuilder.Builder), + "vmware-iso": new(vmwareisobuilder.Builder), + "vmware-vmx": new(vmwarevmxbuilder.Builder), + "vsphere-clone": new(vsphereclonebuilder.Builder), + "vsphere-iso": new(vsphereisobuilder.Builder), + "yandex": new(yandexbuilder.Builder), } - var Provisioners = map[string]packer.Provisioner{ - "ansible": new(ansibleprovisioner.Provisioner), - "ansible-local": new(ansiblelocalprovisioner.Provisioner), - "azure-dtlartifact": new(azuredtlartifactprovisioner.Provisioner), - "breakpoint": new(breakpointprovisioner.Provisioner), - "chef-client": new(chefclientprovisioner.Provisioner), - "chef-solo": new(chefsoloprovisioner.Provisioner), - "converge": new(convergeprovisioner.Provisioner), - "file": new(fileprovisioner.Provisioner), - "inspec": new(inspecprovisioner.Provisioner), - "powershell": new(powershellprovisioner.Provisioner), - "puppet-masterless": new(puppetmasterlessprovisioner.Provisioner), - "puppet-server": new(puppetserverprovisioner.Provisioner), + "ansible": new(ansibleprovisioner.Provisioner), + "ansible-local": new(ansiblelocalprovisioner.Provisioner), + "azure-dtlartifact": new(azuredtlartifactprovisioner.Provisioner), + "breakpoint": new(breakpointprovisioner.Provisioner), + "chef-client": new(chefclientprovisioner.Provisioner), + "chef-solo": new(chefsoloprovisioner.Provisioner), + "converge": new(convergeprovisioner.Provisioner), + "file": new(fileprovisioner.Provisioner), + "inspec": new(inspecprovisioner.Provisioner), + "powershell": new(powershellprovisioner.Provisioner), + "puppet-masterless": new(puppetmasterlessprovisioner.Provisioner), + "puppet-server": new(puppetserverprovisioner.Provisioner), "salt-masterless": new(saltmasterlessprovisioner.Provisioner), - "shell": new(shellprovisioner.Provisioner), - "shell-local": new(shelllocalprovisioner.Provisioner), - "sleep": new(sleepprovisioner.Provisioner), + "shell": new(shellprovisioner.Provisioner), + "shell-local": new(shelllocalprovisioner.Provisioner), + "sleep": new(sleepprovisioner.Provisioner), "windows-restart": new(windowsrestartprovisioner.Provisioner), - "windows-shell": new(windowsshellprovisioner.Provisioner), + "windows-shell": new(windowsshellprovisioner.Provisioner), } - var PostProcessors = map[string]packer.PostProcessor{ - "alicloud-import": new(alicloudimportpostprocessor.PostProcessor), - "amazon-import": new(amazonimportpostprocessor.PostProcessor), - "artifice": new(artificepostprocessor.PostProcessor), - "checksum": new(checksumpostprocessor.PostProcessor), - "compress": new(compresspostprocessor.PostProcessor), - "digitalocean-import": new(digitaloceanimportpostprocessor.PostProcessor), - "docker-import": new(dockerimportpostprocessor.PostProcessor), - "docker-push": new(dockerpushpostprocessor.PostProcessor), - "docker-save": new(dockersavepostprocessor.PostProcessor), - "docker-tag": new(dockertagpostprocessor.PostProcessor), - "exoscale-import": new(exoscaleimportpostprocessor.PostProcessor), - "googlecompute-export": new(googlecomputeexportpostprocessor.PostProcessor), - "googlecompute-import": new(googlecomputeimportpostprocessor.PostProcessor), - "manifest": new(manifestpostprocessor.PostProcessor), - "shell-local": new(shelllocalpostprocessor.PostProcessor), - "ucloud-import": new(ucloudimportpostprocessor.PostProcessor), - "vagrant": new(vagrantpostprocessor.PostProcessor), - "vagrant-cloud": new(vagrantcloudpostprocessor.PostProcessor), - "vsphere": new(vspherepostprocessor.PostProcessor), - "vsphere-template": new(vspheretemplatepostprocessor.PostProcessor), + "alicloud-import": new(alicloudimportpostprocessor.PostProcessor), + "amazon-import": new(amazonimportpostprocessor.PostProcessor), + "artifice": new(artificepostprocessor.PostProcessor), + "checksum": new(checksumpostprocessor.PostProcessor), + "compress": new(compresspostprocessor.PostProcessor), + "digitalocean-import": new(digitaloceanimportpostprocessor.PostProcessor), + "docker-import": new(dockerimportpostprocessor.PostProcessor), + "docker-push": new(dockerpushpostprocessor.PostProcessor), + "docker-save": new(dockersavepostprocessor.PostProcessor), + "docker-tag": new(dockertagpostprocessor.PostProcessor), + "exoscale-import": new(exoscaleimportpostprocessor.PostProcessor), + "googlecompute-export": new(googlecomputeexportpostprocessor.PostProcessor), + "googlecompute-import": new(googlecomputeimportpostprocessor.PostProcessor), + "manifest": new(manifestpostprocessor.PostProcessor), + "shell-local": new(shelllocalpostprocessor.PostProcessor), + "ucloud-import": new(ucloudimportpostprocessor.PostProcessor), + "vagrant": new(vagrantpostprocessor.PostProcessor), + "vagrant-cloud": new(vagrantcloudpostprocessor.PostProcessor), + "vsphere": new(vspherepostprocessor.PostProcessor), + "vsphere-template": new(vspheretemplatepostprocessor.PostProcessor), } - var pluginRegexp = regexp.MustCompile("packer-(builder|post-processor|provisioner)-(.+)") func (c *PluginCommand) Run(args []string) int { diff --git a/go.sum b/go.sum index f72897bdb..c1f6fb6a9 100644 --- a/go.sum +++ b/go.sum @@ -49,6 +49,7 @@ github.com/Azure/go-autorest/autorest/date v0.2.0 h1:yW+Zlqf26583pE43KhfnhFcdmSW github.com/Azure/go-autorest/autorest/date v0.2.0/go.mod h1:vcORJHLJEh643/Ioh9+vPmf1Ij9AEBM5FuBIXLmIy0g= github.com/Azure/go-autorest/autorest/mocks v0.1.0/go.mod h1:OTyCOPRA2IgIlWxVYxBee2F5Gr4kF2zd2J5cFRaIDN0= github.com/Azure/go-autorest/autorest/mocks v0.2.0/go.mod h1:OTyCOPRA2IgIlWxVYxBee2F5Gr4kF2zd2J5cFRaIDN0= +github.com/Azure/go-autorest/autorest/mocks v0.3.0 h1:qJumjCaCudz+OcqE9/XtEPfvtOjOmKaui4EOpFI6zZc= github.com/Azure/go-autorest/autorest/mocks v0.3.0/go.mod h1:a8FDP3DYzQ4RYfVAxAN3SVSiiO77gL2j2ronKKP0syM= github.com/Azure/go-autorest/autorest/to v0.3.0 h1:zebkZaadz7+wIQYgC7GXaz3Wb28yKYfVkkBKwc38VF8= github.com/Azure/go-autorest/autorest/to v0.3.0/go.mod h1:MgwOyqaIuKdG4TL/2ywSsIWKAfJfgHDo8ObuUk3t5sA= diff --git a/vendor/modules.txt b/vendor/modules.txt index c9457aa61..d271b2ec5 100644 --- a/vendor/modules.txt +++ b/vendor/modules.txt @@ -683,12 +683,18 @@ go.opencensus.io/trace/internal go.opencensus.io/trace/propagation go.opencensus.io/trace/tracestate <<<<<<< HEAD +<<<<<<< HEAD # golang.org/x/crypto v0.0.0-20200117160349-530e935923ad golang.org/x/crypto/bcrypt golang.org/x/crypto/blowfish ======= # golang.org/x/crypto v0.0.0-20191206172530-e9b2fee46413 >>>>>>> Updating the module dependencies +======= +# golang.org/x/crypto v0.0.0-20200117160349-530e935923ad +golang.org/x/crypto/bcrypt +golang.org/x/crypto/blowfish +>>>>>>> Fixing the linting errors now required for merging golang.org/x/crypto/chacha20 golang.org/x/crypto/curve25519 golang.org/x/crypto/ed25519