From abbe3d594fd4b0069ffe55e2ed7aa52aa5e99612 Mon Sep 17 00:00:00 2001 From: Adrian Todorov Date: Tue, 28 May 2019 16:40:55 +0200 Subject: [PATCH 1/7] create attributes subresource and test it's implementation in resource_solidfire_volume.go --- solidfire/attributes_subresource.go | 11 ++++++++++ solidfire/element/volume.go | 30 +++++++++++++------------- solidfire/resource_solidfire_volume.go | 17 +++++++++------ 3 files changed, 36 insertions(+), 22 deletions(-) create mode 100644 solidfire/attributes_subresource.go diff --git a/solidfire/attributes_subresource.go b/solidfire/attributes_subresource.go new file mode 100644 index 0000000..9460c06 --- /dev/null +++ b/solidfire/attributes_subresource.go @@ -0,0 +1,11 @@ +package solidfire + +import "github.com/hashicorp/terraform/helper/schema" + +func schemaAttributes() *schema.Schema { + return &schema.Schema{ + // Attributes subresource + Type: schema.TypeMap, + Optional: true, + } +} diff --git a/solidfire/element/volume.go b/solidfire/element/volume.go index eb605e1..ff3f4a7 100644 --- a/solidfire/element/volume.go +++ b/solidfire/element/volume.go @@ -56,21 +56,21 @@ type DeleteVolumeRequest struct { } type Volume struct { - Name string `json:"name"` - VolumeID int `json:"volumeID"` - Iqn string `json:"iqn"` - Access string `json:"access"` - AccountID int `json:"accountID"` - Attributes interface{} `structs:"attributes"` - BlockSize int `json:"blockSize"` - Enable512e bool `json:"enable512e"` - QOS QualityOfService `structs:"qos"` - ScsiEUIDeviceID string `json:"scsiEUIDeviceID"` - ScsiNAADeviceID string `json:"ScsiNAADeviceID"` - Status string `json:"status"` - TotalSize int `structs:"totalSize"` - VirtualVolumeID int `json:"virtualVolumeID"` - VolumeAccessGroups []int `json:"volumeAccessGroups"` + Name string `json:"name"` + VolumeID int `json:"volumeID"` + Iqn string `json:"iqn"` + Access string `json:"access"` + AccountID int `json:"accountID"` + Attributes map[string]string `structs:"attributes"` + BlockSize int `json:"blockSize"` + Enable512e bool `json:"enable512e"` + QOS QualityOfService `structs:"qos"` + ScsiEUIDeviceID string `json:"scsiEUIDeviceID"` + ScsiNAADeviceID string `json:"ScsiNAADeviceID"` + Status string `json:"status"` + TotalSize int `structs:"totalSize"` + VirtualVolumeID int `json:"virtualVolumeID"` + VolumeAccessGroups []int `json:"volumeAccessGroups"` } func (c *Client) GetVolumeByID(id string) (Volume, error) { diff --git a/solidfire/resource_solidfire_volume.go b/solidfire/resource_solidfire_volume.go index 2bf06c5..106c20f 100644 --- a/solidfire/resource_solidfire_volume.go +++ b/solidfire/resource_solidfire_volume.go @@ -43,13 +43,7 @@ func resourceSolidFireVolume() *schema.Resource { Type: schema.TypeInt, Required: true, }, - "attributes": { - Type: schema.TypeList, - Optional: true, - Elem: &schema.Schema{ - Type: schema.TypeString, - }, - }, + "attributes": schemaAttributes(), "block_size": { Type: schema.TypeInt, Computed: true, @@ -141,6 +135,10 @@ func resourceSolidFireVolumeCreate(d *schema.ResourceData, meta interface{}) err volume.QOS.BurstIOPS = v.(int) } + if v, ok := d.GetOk("attributes"); ok { + volume.Attributes = v.(map[string]string) + } + resp, err := client.CreateVolume(volume) if err != nil { log.Print("Error creating volume") @@ -222,6 +220,11 @@ func resourceSolidFireVolumeUpdate(d *schema.ResourceData, meta interface{}) err if v, ok := d.GetOk("burst_iops"); ok { volume.QOS.BurstIOPS = v.(int) } + + if v, ok := d.GetOk("attributes"); ok { + volume.Attributes = v.(map[string]string) + } + err := client.UpdateVolume(volume) if err != nil { return err From 20f0099a722247654c2874a4575926fa48465f85 Mon Sep 17 00:00:00 2001 From: Adrian Todorov Date: Tue, 28 May 2019 18:14:09 +0200 Subject: [PATCH 2/7] add attribute-related tests to resource_solidfire_volume_test.go --- solidfire/resource_solidfire_volume_test.go | 27 +++++++++++++++++++++ 1 file changed, 27 insertions(+) diff --git a/solidfire/resource_solidfire_volume_test.go b/solidfire/resource_solidfire_volume_test.go index 0495a6e..9df6b43 100644 --- a/solidfire/resource_solidfire_volume_test.go +++ b/solidfire/resource_solidfire_volume_test.go @@ -40,6 +40,7 @@ func TestVolume_basic(t *testing.T) { resource.TestCheckResourceAttr("solidfire_volume.terraform-acceptance-test-1", "access", "readWrite"), resource.TestCheckResourceAttr("solidfire_volume.terraform-acceptance-test-1", "status", "active"), resource.TestCheckResourceAttr("solidfire_volume.terraform-acceptance-test-1", "purge_on_delete", "true"), + resource.TestCheckResourceAttr("solidfire_volume.terraform-acceptance-test-1", "attributes.%", "1"), resource.TestCheckResourceAttrSet("solidfire_volume.terraform-acceptance-test-1", "volume_id"), resource.TestCheckResourceAttrSet("solidfire_volume.terraform-acceptance-test-1", "iqn"), resource.TestCheckResourceAttrSet("solidfire_volume.terraform-acceptance-test-1", "block_size"), @@ -81,6 +82,7 @@ func TestVolume_update(t *testing.T) { resource.TestCheckResourceAttr("solidfire_volume.terraform-acceptance-test-1", "access", "readWrite"), resource.TestCheckResourceAttr("solidfire_volume.terraform-acceptance-test-1", "status", "active"), resource.TestCheckResourceAttr("solidfire_volume.terraform-acceptance-test-1", "purge_on_delete", "false"), + resource.TestCheckResourceAttr("solidfire_volume.terraform-acceptance-test-1", "attributes.%", "1"), resource.TestCheckResourceAttrSet("solidfire_volume.terraform-acceptance-test-1", "volume_id"), resource.TestCheckResourceAttrSet("solidfire_volume.terraform-acceptance-test-1", "iqn"), resource.TestCheckResourceAttrSet("solidfire_volume.terraform-acceptance-test-1", "block_size"), @@ -109,6 +111,7 @@ func TestVolume_update(t *testing.T) { resource.TestCheckResourceAttr("solidfire_volume.terraform-acceptance-test-1", "min_iops", "650"), resource.TestCheckResourceAttr("solidfire_volume.terraform-acceptance-test-1", "max_iops", "8600"), resource.TestCheckResourceAttr("solidfire_volume.terraform-acceptance-test-1", "burst_iops", "9600"), + resource.TestCheckResourceAttr("solidfire_volume.terraform-acceptance-test-1", "attributes.%", "3"), ), }, }, @@ -191,6 +194,14 @@ func testAccCheckSolidFireVolumeAttributes(volume *element.Volume) resource.Test if volume.Status != "active" { return fmt.Errorf("Volume is not active") } + if len(volume.Attributes) != 1 { + return fmt.Errorf("Number of attributes is %d, was expecting %d",len(volume.Attributes), 1) + } + for k, v := range volume.Attributes { + if k != "test" || v != "test"{ + return fmt.Errorf("Attributes key and value are %s and %s, was expecting %s and %s", k, v, "test", "test") + } + } // Check volume's account_id and volume_access_group_id are correct for _, rs := range s.RootModule().Resources { @@ -238,6 +249,14 @@ func testAccCheckSolidFireVolumeAttributesUpdate(volume *element.Volume) resourc if volume.Status != "active" { return fmt.Errorf("Volume is not active") } + if len(volume.Attributes) != 3 { + return fmt.Errorf("Number of attributes is %d, was expecting %d",len(volume.Attributes), 3) + } + for k, v := range volume.Attributes { + if k != v { + return fmt.Errorf("Attributes key and value are %s and %s, was expecting them to be equal", k, v) + } + } // Check volume's account_id and volume_access_group_id are correct for _, rs := range s.RootModule().Resources { @@ -298,6 +317,9 @@ resource "solidfire_volume" "terraform-acceptance-test-1" { max_iops = "%s" burst_iops = "%s" purge_on_delete = "%s" + attributes { + test = "test" + } } resource "solidfire_account" "terraform-acceptance-test-1" { username = "terraform-acceptance-test-volume" @@ -313,6 +335,11 @@ resource "solidfire_volume" "terraform-acceptance-test-1" { max_iops = "%s" burst_iops = "%s" purge_on_delete = "%s" + attributes { + test = "test" + test2 = "test2" + test3 = "test3" + } } resource "solidfire_account" "terraform-acceptance-test-1" { From 2e0805d30335bceda53677dd34f924950975b8ce Mon Sep 17 00:00:00 2001 From: Adrian Todorov Date: Wed, 29 May 2019 16:31:54 +0200 Subject: [PATCH 3/7] commit --- solidfire/attributes_subresource.go | 1 + solidfire/data_source_solidfire_volume.go | 96 +++++++++++++++++++++ solidfire/element/volume.go | 22 ++--- solidfire/provider.go | 3 + solidfire/resource_solidfire_volume.go | 16 +++- solidfire/resource_solidfire_volume_test.go | 10 +-- 6 files changed, 131 insertions(+), 17 deletions(-) create mode 100644 solidfire/data_source_solidfire_volume.go diff --git a/solidfire/attributes_subresource.go b/solidfire/attributes_subresource.go index 9460c06..0cbc5d6 100644 --- a/solidfire/attributes_subresource.go +++ b/solidfire/attributes_subresource.go @@ -7,5 +7,6 @@ func schemaAttributes() *schema.Schema { // Attributes subresource Type: schema.TypeMap, Optional: true, + Elem: &schema.Schema{Type: schema.TypeString}, } } diff --git a/solidfire/data_source_solidfire_volume.go b/solidfire/data_source_solidfire_volume.go new file mode 100644 index 0000000..4bcd13e --- /dev/null +++ b/solidfire/data_source_solidfire_volume.go @@ -0,0 +1,96 @@ +package solidfire + +import ( + "github.com/hashicorp/terraform/helper/schema" + "github.com/hashicorp/terraform/helper/validation" +) + +func dataSourceSolidFireVolume() *schema.Resource { + return &schema.Resource{ + Read: dataSourceSolidFireVolumeRead, + Schema: map[string]*schema.Schema{ + "account_filter": { + Type: schema.TypeList, + Optional: true, + Elem: &schema.Schema{ + Type: schema.TypeInt, + }, + Description: "The ID of the account to filter on", + }, + "name_filter": { + Type: schema.TypeString, + Optional: true, + Description: "A regular expression to filter the name of volumes", + ValidateFunc: validation.ValidateRegexp, + }, + + "name": { + Type: schema.TypeString, + Computed: true, + }, + "volume_id": { + Type: schema.TypeInt, + Computed: true, + }, + "iqn": { + Type: schema.TypeString, + Computed: true, + }, + "access": { + Type: schema.TypeString, + Computed: true, + }, + "attributes": { + Type: schema.TypeList, + Computed: true, + Elem: &schema.Schema{ + Type: schema.TypeString, + }, + }, + "block_size": { + Type: schema.TypeInt, + Computed: true, + }, + "enable512e": { + Type: schema.TypeBool, + Computed: true, + }, + "min_iops": { + Type: schema.TypeInt, + Computed: true, + }, + "max_iops": { + Type: schema.TypeInt, + Computed: true, + }, + "burst_iops": { + Type: schema.TypeInt, + Computed: true, + }, + "scsi_eui_device_id": { + Type: schema.TypeString, + Computed: true, + }, + "scsi_naa_device_id": { + Type: schema.TypeString, + Computed: true, + }, + "status": { + Type: schema.TypeString, + Computed: true, + }, + "virtual_volume_id": { + Type: schema.TypeString, + Computed: true, + }, + "total_size": { + Type: schema.TypeInt, + Computed: true, + }, + }, + } +} + +func dataSourceSolidFireVolumeRead(d *schema.ResourceData, meta interface{}) error { + return nil +} diff --git a/solidfire/element/volume.go b/solidfire/element/volume.go index ff3f4a7..ba7c917 100644 --- a/solidfire/element/volume.go +++ b/solidfire/element/volume.go @@ -30,12 +30,12 @@ type QualityOfService struct { } type CreateVolumeRequest struct { - Name string `structs:"name"` - AccountID int `structs:"accountID"` - TotalSize int `structs:"totalSize"` - Enable512E bool `structs:"enable512e"` - Attributes interface{} `structs:"attributes"` - QOS QualityOfService `structs:"qos"` + Name string `structs:"name"` + AccountID int `structs:"accountID"` + TotalSize int `structs:"totalSize"` + Enable512E bool `structs:"enable512e"` + Attributes map[string]string `structs:"attributes"` + QOS QualityOfService `structs:"qos"` } type CreateVolumeResult struct { @@ -44,11 +44,11 @@ type CreateVolumeResult struct { } type ModifyVolumeRequest struct { - VolumeID int `structs:"volumeID"` - AccountID int `structs:"accountID"` - Attributes interface{} `structs:"attributes"` - QOS QualityOfService `structs:"qos"` - TotalSize int `structs:"totalSize"` + VolumeID int `structs:"volumeID"` + AccountID int `structs:"accountID"` + Attributes map[string]string `structs:"attributes"` + QOS QualityOfService `structs:"qos"` + TotalSize int `structs:"totalSize"` } type DeleteVolumeRequest struct { diff --git a/solidfire/provider.go b/solidfire/provider.go index 75f00e7..97a92b7 100644 --- a/solidfire/provider.go +++ b/solidfire/provider.go @@ -40,6 +40,9 @@ func Provider() terraform.ResourceProvider { "solidfire_volume": resourceSolidFireVolume(), "solidfire_account": resourceSolidFireAccount(), }, + DataSourcesMap: map[string]*schema.Resource{ + "solidfire_volume": dataSourceSolidFireVolume(), + }, ConfigureFunc: providerConfigure, } diff --git a/solidfire/resource_solidfire_volume.go b/solidfire/resource_solidfire_volume.go index 106c20f..1524d4c 100644 --- a/solidfire/resource_solidfire_volume.go +++ b/solidfire/resource_solidfire_volume.go @@ -134,6 +134,12 @@ func resourceSolidFireVolumeCreate(d *schema.ResourceData, meta interface{}) err if v, ok := d.GetOk("burst_iops"); ok { volume.QOS.BurstIOPS = v.(int) } + volume.Attributes = make(map[string]string) + if v, ok := d.GetOk("attributes"); ok { + for key, val := range v.(map[string]interface{}) { + volume.Attributes[key] = val.(string) + } + } if v, ok := d.GetOk("attributes"); ok { volume.Attributes = v.(map[string]string) @@ -166,7 +172,12 @@ func resourceSolidFireVolumeRead(d *schema.ResourceData, meta interface{}) error d.Set("iqn", volume.Iqn) d.Set("access", volume.Access) d.Set("account_id", volume.AccountID) + d.Set("attributes", volume.Attributes) + for key, val := range volume.Attributes { + d.Set("attributes."+key, val) + } + d.Set("block_size", volume.BlockSize) d.Set("enable512e", volume.Enable512e) d.Set("min_iops", volume.QOS.MinIOPS) @@ -221,8 +232,11 @@ func resourceSolidFireVolumeUpdate(d *schema.ResourceData, meta interface{}) err volume.QOS.BurstIOPS = v.(int) } + volume.Attributes = make(map[string]string) if v, ok := d.GetOk("attributes"); ok { - volume.Attributes = v.(map[string]string) + for key, val := range v.(map[string]interface{}) { + volume.Attributes[key] = val.(string) + } } err := client.UpdateVolume(volume) diff --git a/solidfire/resource_solidfire_volume_test.go b/solidfire/resource_solidfire_volume_test.go index 9df6b43..4266550 100644 --- a/solidfire/resource_solidfire_volume_test.go +++ b/solidfire/resource_solidfire_volume_test.go @@ -195,10 +195,10 @@ func testAccCheckSolidFireVolumeAttributes(volume *element.Volume) resource.Test return fmt.Errorf("Volume is not active") } if len(volume.Attributes) != 1 { - return fmt.Errorf("Number of attributes is %d, was expecting %d",len(volume.Attributes), 1) + return fmt.Errorf("Number of attributes is %d, was expecting %d", len(volume.Attributes), 1) } for k, v := range volume.Attributes { - if k != "test" || v != "test"{ + if k != "test" || v != "test" { return fmt.Errorf("Attributes key and value are %s and %s, was expecting %s and %s", k, v, "test", "test") } } @@ -250,7 +250,7 @@ func testAccCheckSolidFireVolumeAttributesUpdate(volume *element.Volume) resourc return fmt.Errorf("Volume is not active") } if len(volume.Attributes) != 3 { - return fmt.Errorf("Number of attributes is %d, was expecting %d",len(volume.Attributes), 3) + return fmt.Errorf("Number of attributes is %d, was expecting %d", len(volume.Attributes), 3) } for k, v := range volume.Attributes { if k != v { @@ -317,7 +317,7 @@ resource "solidfire_volume" "terraform-acceptance-test-1" { max_iops = "%s" burst_iops = "%s" purge_on_delete = "%s" - attributes { + attributes = { test = "test" } } @@ -335,7 +335,7 @@ resource "solidfire_volume" "terraform-acceptance-test-1" { max_iops = "%s" burst_iops = "%s" purge_on_delete = "%s" - attributes { + attributes = { test = "test" test2 = "test2" test3 = "test3" From 9b7edcb4835368c87f8e50adfe9c641ec2f1001f Mon Sep 17 00:00:00 2001 From: Adrian Todorov Date: Wed, 29 May 2019 17:47:17 +0200 Subject: [PATCH 4/7] split attributes subresource schema in resource and data source --- solidfire/attributes_subresource.go | 11 ++++++++++- solidfire/resource_solidfire_volume.go | 7 +++---- 2 files changed, 13 insertions(+), 5 deletions(-) diff --git a/solidfire/attributes_subresource.go b/solidfire/attributes_subresource.go index 0cbc5d6..9eee749 100644 --- a/solidfire/attributes_subresource.go +++ b/solidfire/attributes_subresource.go @@ -2,7 +2,7 @@ package solidfire import "github.com/hashicorp/terraform/helper/schema" -func schemaAttributes() *schema.Schema { +func schemaResourceAttributes() *schema.Schema { return &schema.Schema{ // Attributes subresource Type: schema.TypeMap, @@ -10,3 +10,12 @@ func schemaAttributes() *schema.Schema { Elem: &schema.Schema{Type: schema.TypeString}, } } + +func schemaDataSourceAttributes() *schema.Schema { + return &schema.Schema{ + // Attributes subresource + Type: schema.TypeMap, + Computed: true, + Elem: &schema.Schema{Type: schema.TypeString}, + } +} diff --git a/solidfire/resource_solidfire_volume.go b/solidfire/resource_solidfire_volume.go index 2e77183..c21a4f7 100644 --- a/solidfire/resource_solidfire_volume.go +++ b/solidfire/resource_solidfire_volume.go @@ -43,7 +43,7 @@ func resourceSolidFireVolume() *schema.Resource { Type: schema.TypeInt, Required: true, }, - "attributes": schemaAttributes(), + "attributes": schemaResourceAttributes(), "block_size": { Type: schema.TypeInt, Computed: true, @@ -140,7 +140,7 @@ func resourceSolidFireVolumeCreate(d *schema.ResourceData, meta interface{}) err volume.Attributes[key] = val.(string) } } - + resp, err := client.CreateVolume(volume) if err != nil { log.Print("Error creating volume") @@ -183,11 +183,10 @@ func resourceSolidFireVolumeRead(d *schema.ResourceData, meta interface{}) error d.Set("scsi_naa_device_id", volume.ScsiNAADeviceID) d.Set("status", volume.Status) d.Set("total_size", volume.TotalSize) - d.Set("virtual_volumeID", volume.VirtualVolumeID) + d.Set("virtual_volume_id", volume.VirtualVolumeID) log.Printf("[DEBUG] %s: Read complete", volume.Name) return nil - } func resourceSolidFireVolumeUpdate(d *schema.ResourceData, meta interface{}) error { From ed1596655b024b5afe80e859ea1c9da7788e6214 Mon Sep 17 00:00:00 2001 From: Adrian Todorov Date: Wed, 29 May 2019 17:47:43 +0200 Subject: [PATCH 5/7] add dataSourceSolidFireVolumeRead --- solidfire/data_source_solidfire_volume.go | 42 +++++++++++++++++++---- 1 file changed, 35 insertions(+), 7 deletions(-) diff --git a/solidfire/data_source_solidfire_volume.go b/solidfire/data_source_solidfire_volume.go index 4bcd13e..20be936 100644 --- a/solidfire/data_source_solidfire_volume.go +++ b/solidfire/data_source_solidfire_volume.go @@ -1,8 +1,11 @@ package solidfire import ( + "log" + "github.com/hashicorp/terraform/helper/schema" "github.com/hashicorp/terraform/helper/validation" + "github.com/sofixa/terraform-provider-solidfire/solidfire/element" ) func dataSourceSolidFireVolume() *schema.Resource { @@ -40,13 +43,7 @@ func dataSourceSolidFireVolume() *schema.Resource { Type: schema.TypeString, Computed: true, }, - "attributes": { - Type: schema.TypeList, - Computed: true, - Elem: &schema.Schema{ - Type: schema.TypeString, - }, - }, + "attributes": schemaDataSourceAttributes(), "block_size": { Type: schema.TypeInt, Computed: true, @@ -92,5 +89,36 @@ func dataSourceSolidFireVolume() *schema.Resource { } func dataSourceSolidFireVolumeRead(d *schema.ResourceData, meta interface{}) error { + log.Printf("[DEBUG] Reading volume: %#v", d) + client := meta.(*element.Client) + + volume, err := client.GetVolumeByID(d.Id()) + if err != nil { + return err + } + + d.Set("name", volume.Name) + d.Set("volume_id", volume.VolumeID) + d.Set("iqn", volume.Iqn) + d.Set("access", volume.Access) + d.Set("account_id", volume.AccountID) + + d.Set("attributes", volume.Attributes) + for key, val := range volume.Attributes { + d.Set("attributes."+key, val) + } + + d.Set("block_size", volume.BlockSize) + d.Set("enable512e", volume.Enable512e) + d.Set("min_iops", volume.QOS.MinIOPS) + d.Set("max_iops", volume.QOS.MaxIOPS) + d.Set("burst_iops", volume.QOS.BurstIOPS) + d.Set("scsi_eui_device_id", volume.ScsiEUIDeviceID) + d.Set("scsi_naa_device_id", volume.ScsiNAADeviceID) + d.Set("status", volume.Status) + d.Set("total_size", volume.TotalSize) + d.Set("virtual_volume_id", volume.VirtualVolumeID) + + log.Printf("[DEBUG] %s: Read complete", volume.Name) return nil } From cdbd880ae152d150c715caa9da04bddeffad6232 Mon Sep 17 00:00:00 2001 From: Adrian Todorov Date: Fri, 31 May 2019 18:27:24 +0200 Subject: [PATCH 6/7] split some volume logic and tests to share between resource and data source; add data source volume tests --- .../data_source_solidfire_volume_test.go | 178 ++++++++++++++++++ solidfire/resource_solidfire_volume_test.go | 94 +-------- solidfire/volume_helper.go | 1 + solidfire/volume_test.go | 91 +++++++++ 4 files changed, 278 insertions(+), 86 deletions(-) create mode 100644 solidfire/data_source_solidfire_volume_test.go create mode 100644 solidfire/volume_helper.go create mode 100644 solidfire/volume_test.go diff --git a/solidfire/data_source_solidfire_volume_test.go b/solidfire/data_source_solidfire_volume_test.go new file mode 100644 index 0000000..1b06d52 --- /dev/null +++ b/solidfire/data_source_solidfire_volume_test.go @@ -0,0 +1,178 @@ +package solidfire + +import ( + "fmt" + "github.com/hashicorp/terraform/helper/resource" + "github.com/sofixa/terraform-provider-solidfire/solidfire/element" + "testing" +) + +func TestAccDataSourceVolume_basic(t *testing.T) { + var volume element.Volume + resource.Test(t, resource.TestCase{ + PreCheck: func() { testAccPreCheck(t) }, + Providers: testAccProviders, + CheckDestroy: testAccCheckSolidFireVolumeDestroy, + Steps: []resource.TestStep{ + { + Config: fmt.Sprintf( + testAccCheckDataSourceSolidFireVolumeConfig, + "terraform-acceptance-test", + "1080033280", + "true", + "500", + "8000", + "10000", + "true", + "terraform-acceptance-test", + ), + Check: resource.ComposeTestCheckFunc( + testAccCheckSolidFireVolumeExists("solidfire_volume.terraform-acceptance-test-1", &volume), + testAccCheckSolidFireVolumeAttributes(&volume), + resource.TestCheckResourceAttrPair("solidfire_volume.terraform-acceptance-test-1", "name", "data.solidfire_volume","name"), + resource.TestCheckResourceAttrPair("solidfire_volume.terraform-acceptance-test-1", "total_size", "data.solidfire_volume","total_size"), + resource.TestCheckResourceAttrPair("solidfire_volume.terraform-acceptance-test-1", "enable512e", "data.solidfire_volume","enable512e"), + resource.TestCheckResourceAttrPair("solidfire_volume.terraform-acceptance-test-1", "min_iops", "data.solidfire_volume","min_iops"), + resource.TestCheckResourceAttrPair("solidfire_volume.terraform-acceptance-test-1", "max_iops", "data.solidfire_volume","max_iops"), + resource.TestCheckResourceAttrPair("solidfire_volume.terraform-acceptance-test-1", "burst_iops", "data.solidfire_volume","burst_iops"), + resource.TestCheckResourceAttrPair("solidfire_volume.terraform-acceptance-test-1", "access", "data.solidfire_volume","access"), + resource.TestCheckResourceAttrPair("solidfire_volume.terraform-acceptance-test-1", "status", "data.solidfire_volume","status"), + resource.TestCheckResourceAttrPair("solidfire_volume.terraform-acceptance-test-1", "purge_on_delete", "data.solidfire_volume","purge_on_delete"), + resource.TestCheckResourceAttrPair("solidfire_volume.terraform-acceptance-test-1", "attributes", "data.solidfire_volume","attributes"), + resource.TestCheckResourceAttrPair("solidfire_volume.terraform-acceptance-test-1", "volume_id", "data.solidfire_volume","volume_id"), + resource.TestCheckResourceAttrPair("solidfire_volume.terraform-acceptance-test-1", "iqn", "data.solidfire_volume","iqn"), + resource.TestCheckResourceAttrPair("solidfire_volume.terraform-acceptance-test-1", "block_size", "data.solidfire_volume","block_size"), + resource.TestCheckResourceAttrPair("solidfire_volume.terraform-acceptance-test-1", "scsi_eui_device_id", "data.solidfire_volume","scsi_eui_device_id"), + resource.TestCheckResourceAttrPair("solidfire_volume.terraform-acceptance-test-1", "scsi_naa_device_id", "data.solidfire_volume","scsi_naa_device_id"), + ), + }, + }, + }) +} + +func TestAccDataSourceVolume_update(t *testing.T) { + var volume element.Volume + resource.Test(t, resource.TestCase{ + PreCheck: func() { testAccPreCheck(t) }, + Providers: testAccProviders, + CheckDestroy: testAccCheckSolidFireVolumeDestroy, + Steps: []resource.TestStep{ + { + Config: fmt.Sprintf( + testAccCheckDataSourceSolidFireVolumeConfig, + "terraform-acceptance-test", + "1080033280", + "true", + "500", + "8000", + "10000", + "false", + "terraform-acceptance-test", + ), + Check: resource.ComposeTestCheckFunc( + testAccCheckSolidFireVolumeExists("solidfire_volume.terraform-acceptance-test-1", &volume), + testAccCheckSolidFireVolumeAttributes(&volume), + resource.TestCheckResourceAttrPair("solidfire_volume.terraform-acceptance-test-1", "name", "data.solidfire_volume","name"), + resource.TestCheckResourceAttrPair("solidfire_volume.terraform-acceptance-test-1", "total_size", "data.solidfire_volume","total_size"), + resource.TestCheckResourceAttrPair("solidfire_volume.terraform-acceptance-test-1", "enable512e", "data.solidfire_volume","enable512e"), + resource.TestCheckResourceAttrPair("solidfire_volume.terraform-acceptance-test-1", "min_iops", "data.solidfire_volume","min_iops"), + resource.TestCheckResourceAttrPair("solidfire_volume.terraform-acceptance-test-1", "max_iops", "data.solidfire_volume","max_iops"), + resource.TestCheckResourceAttrPair("solidfire_volume.terraform-acceptance-test-1", "burst_iops", "data.solidfire_volume","burst_iops"), + resource.TestCheckResourceAttrPair("solidfire_volume.terraform-acceptance-test-1", "access", "data.solidfire_volume","access"), + resource.TestCheckResourceAttrPair("solidfire_volume.terraform-acceptance-test-1", "status", "data.solidfire_volume","status"), + resource.TestCheckResourceAttrPair("solidfire_volume.terraform-acceptance-test-1", "purge_on_delete", "data.solidfire_volume","purge_on_delete"), + resource.TestCheckResourceAttrPair("solidfire_volume.terraform-acceptance-test-1", "attributes", "data.solidfire_volume","attributes"), + resource.TestCheckResourceAttrPair("solidfire_volume.terraform-acceptance-test-1", "volume_id", "data.solidfire_volume","volume_id"), + resource.TestCheckResourceAttrPair("solidfire_volume.terraform-acceptance-test-1", "iqn", "data.solidfire_volume","iqn"), + resource.TestCheckResourceAttrPair("solidfire_volume.terraform-acceptance-test-1", "block_size", "data.solidfire_volume","block_size"), + resource.TestCheckResourceAttrPair("solidfire_volume.terraform-acceptance-test-1", "scsi_eui_device_id", "data.solidfire_volume","scsi_eui_device_id"), + resource.TestCheckResourceAttrPair("solidfire_volume.terraform-acceptance-test-1", "scsi_naa_device_id", "data.solidfire_volume","scsi_naa_device_id"), + ), + }, + { + Config: fmt.Sprintf( + testAccCheckDataSourceSolidFireVolumeConfigUpdate, + "terraform-acceptance-test", + "1090519040", + "true", + "650", + "8600", + "9600", + "true", + "terraform-acceptance-test", + + ), + Check: resource.ComposeTestCheckFunc( + testAccCheckSolidFireVolumeExists("solidfire_volume.terraform-acceptance-test-1", &volume), + testAccCheckSolidFireVolumeAttributesUpdate(&volume), + resource.TestCheckResourceAttrPair("solidfire_volume.terraform-acceptance-test-1", "name", "data.solidfire_volume","name"), + resource.TestCheckResourceAttrPair("solidfire_volume.terraform-acceptance-test-1", "total_size", "data.solidfire_volume","total_size"), + resource.TestCheckResourceAttrPair("solidfire_volume.terraform-acceptance-test-1", "enable512e", "data.solidfire_volume","enable512e"), + resource.TestCheckResourceAttrPair("solidfire_volume.terraform-acceptance-test-1", "min_iops", "data.solidfire_volume","min_iops"), + resource.TestCheckResourceAttrPair("solidfire_volume.terraform-acceptance-test-1", "max_iops", "data.solidfire_volume","max_iops"), + resource.TestCheckResourceAttrPair("solidfire_volume.terraform-acceptance-test-1", "burst_iops", "data.solidfire_volume","burst_iops"), + resource.TestCheckResourceAttrPair("solidfire_volume.terraform-acceptance-test-1", "access", "data.solidfire_volume","access"), + resource.TestCheckResourceAttrPair("solidfire_volume.terraform-acceptance-test-1", "status", "data.solidfire_volume","status"), + resource.TestCheckResourceAttrPair("solidfire_volume.terraform-acceptance-test-1", "purge_on_delete", "data.solidfire_volume","purge_on_delete"), + resource.TestCheckResourceAttrPair("solidfire_volume.terraform-acceptance-test-1", "attributes", "data.solidfire_volume","attributes"), + resource.TestCheckResourceAttrPair("solidfire_volume.terraform-acceptance-test-1", "volume_id", "data.solidfire_volume","volume_id"), + resource.TestCheckResourceAttrPair("solidfire_volume.terraform-acceptance-test-1", "iqn", "data.solidfire_volume","iqn"), + resource.TestCheckResourceAttrPair("solidfire_volume.terraform-acceptance-test-1", "block_size", "data.solidfire_volume","block_size"), + resource.TestCheckResourceAttrPair("solidfire_volume.terraform-acceptance-test-1", "scsi_eui_device_id", "data.solidfire_volume","scsi_eui_device_id"), + resource.TestCheckResourceAttrPair("solidfire_volume.terraform-acceptance-test-1", "scsi_naa_device_id", "data.solidfire_volume","scsi_naa_device_id"), + ), + }, + }, + }) +} + + + +const testAccCheckDataSourceSolidFireVolumeConfig = ` +resource "solidfire_volume" "terraform-acceptance-test-1" { + name = "%s" + account_id = "${solidfire_account.terraform-acceptance-test-1.id}" + total_size = "%s" + enable512e = "%s" + min_iops = "%s" + max_iops = "%s" + burst_iops = "%s" + purge_on_delete = "%s" + attributes = { + test = "test" + } +} + +data "solidfire_volume" "terraform-acceptance-test-1" { + name_filter = "%s" +} + +resource "solidfire_account" "terraform-acceptance-test-1" { + username = "terraform-acceptance-test-volume" +} +` +const testAccCheckDataSourceSolidFireVolumeConfigUpdate = ` +resource "solidfire_volume" "terraform-acceptance-test-1" { + name = "%s" + account_id = "${solidfire_account.terraform-acceptance-test-1.id}" + total_size = "%s" + enable512e = "%s" + min_iops = "%s" + max_iops = "%s" + burst_iops = "%s" + purge_on_delete = "%s" + attributes = { + test = "test" + test2 = "test2" + test3 = "test3" + } +} + +data "solidfire_volume" "terraform-acceptance-test-1" { + name_filter = "%s" +} + +resource "solidfire_account" "terraform-acceptance-test-1" { + username = "terraform-acceptance-test-volume" +} +` \ No newline at end of file diff --git a/solidfire/resource_solidfire_volume_test.go b/solidfire/resource_solidfire_volume_test.go index 4266550..7c1ca93 100644 --- a/solidfire/resource_solidfire_volume_test.go +++ b/solidfire/resource_solidfire_volume_test.go @@ -5,12 +5,11 @@ import ( "github.com/hashicorp/terraform/helper/resource" "github.com/hashicorp/terraform/terraform" "github.com/sofixa/terraform-provider-solidfire/solidfire/element" - "log" "strconv" "testing" ) -func TestVolume_basic(t *testing.T) { +func TestAccResourceVolume_basic(t *testing.T) { var volume element.Volume resource.Test(t, resource.TestCase{ PreCheck: func() { testAccPreCheck(t) }, @@ -19,7 +18,7 @@ func TestVolume_basic(t *testing.T) { Steps: []resource.TestStep{ { Config: fmt.Sprintf( - testAccCheckSolidFireVolumeConfig, + testAccCheckResourceSolidFireVolumeConfig, "terraform-acceptance-test", "1080033280", "true", @@ -52,7 +51,7 @@ func TestVolume_basic(t *testing.T) { }) } -func TestVolume_update(t *testing.T) { +func TestAccResourceVolume_update(t *testing.T) { var volume element.Volume resource.Test(t, resource.TestCase{ PreCheck: func() { testAccPreCheck(t) }, @@ -61,7 +60,7 @@ func TestVolume_update(t *testing.T) { Steps: []resource.TestStep{ { Config: fmt.Sprintf( - testAccCheckSolidFireVolumeConfig, + testAccCheckResourceSolidFireVolumeConfig, "terraform-acceptance-test", "1080033280", "true", @@ -92,7 +91,7 @@ func TestVolume_update(t *testing.T) { }, { Config: fmt.Sprintf( - testAccCheckSolidFireVolumeConfigUpdate, + testAccCheckResourceSolidFireVolumeConfigUpdate, "terraform-acceptance-test", "1090519040", "true", @@ -118,51 +117,6 @@ func TestVolume_update(t *testing.T) { }) } -func testAccCheckSolidFireVolumeDestroy(s *terraform.State) error { - virConn := testAccProvider.Meta().(*element.Client) - var volume element.Volume - var err error - - for _, rs := range s.RootModule().Resources { - if rs.Type != "solidfire_volume" { - continue - } - - volume, err = virConn.GetVolumeByID(rs.Primary.ID) - // volume should have been purged - if rs.Primary.Attributes["purge_on_delete"] == "true" { - if err == nil { - return fmt.Errorf("Error waiting for volume %s to be destroyed, it should have been purged", rs.Primary.ID) - } - } else { - // if there isn't an error, the volume still exists, as it should - if err == nil { - // if the volume's status isn't deleted, it isn't marked as to be purged - if volume.Status != "deleted" { - return fmt.Errorf("Volume %s still exists and status isn't deleted, it's %s", rs.Primary.ID, volume.Status) - // everything is working fine (volume was marked as deleted and will be by the SF), launch an explicit purge to make place for future tests - } else { - log.Printf("[DEBUG] Volume %s wasn't purged due to purge_on_delete=false, purging explicitly to clean up", rs.Primary.ID) - delVolume := element.DeleteVolumeRequest{} - convID, convErr := strconv.Atoi(rs.Primary.ID) - - if convErr != nil { - return fmt.Errorf("id argument is required") - } - delVolume.VolumeID = convID - err := virConn.PurgeDeletedVolume(delVolume) - if err != nil { - return fmt.Errorf("Failed purging volume %s due to error %s", rs.Primary.ID, err) - } - } - } else { - return fmt.Errorf("Volume %s doesn't exist anymore, but it shouldn't have been purged", rs.Primary.ID) - } - } - } - - return nil -} // Compare the actual attributes as present on the SolidFire cluster via the SolidFire API // to check there's no difference between the reality and TF's state @@ -274,40 +228,7 @@ func testAccCheckSolidFireVolumeAttributesUpdate(volume *element.Volume) resourc } } -func testAccCheckSolidFireVolumeExists(n string, volume *element.Volume) resource.TestCheckFunc { - return func(s *terraform.State) error { - virConn := testAccProvider.Meta().(*element.Client) - - rs, ok := s.RootModule().Resources[n] - if !ok { - return fmt.Errorf("Not found: %s", n) - } - - if rs.Primary.ID == "" { - return fmt.Errorf("No SolidFire volume key ID is set") - } - - retrievedVol, err := virConn.GetVolumeByID(rs.Primary.ID) - if err != nil { - return err - } - - convID, err := strconv.Atoi(rs.Primary.ID) - if err != nil { - return err - } - - if retrievedVol.VolumeID != convID { - return fmt.Errorf("Resource ID and volume ID do not match") - } - - *volume = retrievedVol - - return nil - } -} - -const testAccCheckSolidFireVolumeConfig = ` +const testAccCheckResourceSolidFireVolumeConfig = ` resource "solidfire_volume" "terraform-acceptance-test-1" { name = "%s" account_id = "${solidfire_account.terraform-acceptance-test-1.id}" @@ -321,11 +242,12 @@ resource "solidfire_volume" "terraform-acceptance-test-1" { test = "test" } } + resource "solidfire_account" "terraform-acceptance-test-1" { username = "terraform-acceptance-test-volume" } ` -const testAccCheckSolidFireVolumeConfigUpdate = ` +const testAccCheckResourceSolidFireVolumeConfigUpdate = ` resource "solidfire_volume" "terraform-acceptance-test-1" { name = "%s" account_id = "${solidfire_account.terraform-acceptance-test-1.id}" diff --git a/solidfire/volume_helper.go b/solidfire/volume_helper.go new file mode 100644 index 0000000..71fba54 --- /dev/null +++ b/solidfire/volume_helper.go @@ -0,0 +1 @@ +package solidfire diff --git a/solidfire/volume_test.go b/solidfire/volume_test.go new file mode 100644 index 0000000..f24aa46 --- /dev/null +++ b/solidfire/volume_test.go @@ -0,0 +1,91 @@ +package solidfire + +import ( + "fmt" + "github.com/hashicorp/terraform/helper/resource" + "github.com/hashicorp/terraform/terraform" + "github.com/sofixa/terraform-provider-solidfire/solidfire/element" + "log" + "strconv" +) + +func testAccCheckSolidFireVolumeDestroy(s *terraform.State) error { + virConn := testAccProvider.Meta().(*element.Client) + var volume element.Volume + var err error + + for _, rs := range s.RootModule().Resources { + if rs.Type != "solidfire_volume" { + continue + } + + volume, err = virConn.GetVolumeByID(rs.Primary.ID) + // volume should have been purged + if rs.Primary.Attributes["purge_on_delete"] == "true" { + if err == nil { + return fmt.Errorf("Error waiting for volume %s to be destroyed, it should have been purged", rs.Primary.ID) + } + } else { + // if there isn't an error, the volume still exists, as it should + if err == nil { + // if the volume's status isn't deleted, it isn't marked as to be purged + if volume.Status != "deleted" { + return fmt.Errorf("Volume %s still exists and status isn't deleted, it's %s", rs.Primary.ID, volume.Status) + // everything is working fine (volume was marked as deleted and will be by the SF), launch an explicit purge to make place for future tests + } else { + log.Printf("[DEBUG] Volume %s wasn't purged due to purge_on_delete=false, purging explicitly to clean up", rs.Primary.ID) + delVolume := element.DeleteVolumeRequest{} + convID, convErr := strconv.Atoi(rs.Primary.ID) + + if convErr != nil { + return fmt.Errorf("id argument is required") + } + delVolume.VolumeID = convID + err := virConn.PurgeDeletedVolume(delVolume) + if err != nil { + return fmt.Errorf("Failed purging volume %s due to error %s", rs.Primary.ID, err) + } + } + } else { + return fmt.Errorf("Volume %s doesn't exist anymore, but it shouldn't have been purged", rs.Primary.ID) + } + } + } + + return nil +} + +func testAccCheckSolidFireVolumeExists(n string, volume *element.Volume) resource.TestCheckFunc { + return func(s *terraform.State) error { + virConn := testAccProvider.Meta().(*element.Client) + + rs, ok := s.RootModule().Resources[n] + if !ok { + return fmt.Errorf("Not found: %s", n) + } + + if rs.Primary.ID == "" { + return fmt.Errorf("No SolidFire volume key ID is set") + } + + retrievedVol, err := virConn.GetVolumeByID(rs.Primary.ID) + if err != nil { + return err + } + + convID, err := strconv.Atoi(rs.Primary.ID) + if err != nil { + return err + } + + if retrievedVol.VolumeID != convID { + return fmt.Errorf("Resource ID and volume ID do not match") + } + + *volume = retrievedVol + + return nil + } +} + + From db8c5fd2736b9ba19a8fce08be9a492c05bf0384 Mon Sep 17 00:00:00 2001 From: Adrian Todorov Date: Thu, 23 Dec 2021 17:55:44 +0100 Subject: [PATCH 7/7] sync abandoned WIP --- .devcontainer/Dockerfile | 65 ++++++++++ .devcontainer/devcontainer.json | 28 ++++ .gitignore | 2 +- Dockerfile | 1 + GNUmakefile | 2 +- go.mod | 41 +----- go.sum | 122 +++++++++--------- .../data_source_solidfire_volume_test.go | 95 +++++++------- solidfire/element/volume.go | 8 ++ solidfire/resource_solidfire_volume_test.go | 1 - solidfire/volume_test.go | 2 - 11 files changed, 220 insertions(+), 147 deletions(-) create mode 100644 .devcontainer/Dockerfile create mode 100644 .devcontainer/devcontainer.json create mode 100644 Dockerfile diff --git a/.devcontainer/Dockerfile b/.devcontainer/Dockerfile new file mode 100644 index 0000000..e6383fa --- /dev/null +++ b/.devcontainer/Dockerfile @@ -0,0 +1,65 @@ +#------------------------------------------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See https://go.microsoft.com/fwlink/?linkid=2090316 for license information. +#------------------------------------------------------------------------------------------------------------- + +FROM golang:1 + +# Avoid warnings by switching to noninteractive +ENV DEBIAN_FRONTEND=noninteractive + +# Or your actual UID, GID on Linux if not the default 1000 +ARG USERNAME=vscode +ARG USER_UID=1000 +ARG USER_GID=$USER_UID + +# Configure apt, install packages and tools +RUN apt-get update \ + && apt-get -y install --no-install-recommends apt-utils dialog 2>&1 \ + # + # Verify git, process tools, lsb-release (common in install instructions for CLIs) installed + && apt-get -y install git procps lsb-release \ + # + # Install gocode-gomod + && go get -x -d github.com/stamblerre/gocode 2>&1 \ + && go build -o gocode-gomod github.com/stamblerre/gocode \ + && mv gocode-gomod $GOPATH/bin/ \ + # + # Install Go tools + && go get -u -v \ + github.com/mdempsky/gocode \ + github.com/uudashr/gopkgs/cmd/gopkgs \ + github.com/ramya-rao-a/go-outline \ + github.com/acroca/go-symbols \ + github.com/godoctor/godoctor \ + golang.org/x/tools/cmd/guru \ + golang.org/x/tools/cmd/gorename \ + github.com/rogpeppe/godef \ + github.com/zmb3/gogetdoc \ + github.com/haya14busa/goplay/cmd/goplay \ + github.com/sqs/goreturns \ + github.com/josharian/impl \ + github.com/davidrjenni/reftools/cmd/fillstruct \ + github.com/fatih/gomodifytags \ + github.com/cweill/gotests/... \ + golang.org/x/tools/cmd/goimports \ + golang.org/x/lint/golint \ + golang.org/x/tools/cmd/gopls \ + github.com/alecthomas/gometalinter \ + honnef.co/go/tools/... \ + github.com/golangci/golangci-lint/cmd/golangci-lint \ + github.com/mgechev/revive \ + github.com/derekparker/delve/cmd/dlv 2>&1 \ + # + # Create a non-root user to use if preferred - see https://aka.ms/vscode-remote/containers/non-root-user. + && groupadd --gid $USER_GID $USERNAME \ + && useradd -s /bin/bash --uid $USER_UID --gid $USER_GID -m $USERNAME \ + # [Optional] Add sudo support + # && apt-get install -y sudo \ + # && echo $USERNAME ALL=\(root\) NOPASSWD:ALL > /etc/sudoers.d/$USERNAME \ + # && chmod 0440 /etc/sudoers.d/$USERNAME \ + # + # Clean up + && apt-get autoremove -y \ + && apt-get clean -y \ + && rm -rf /var/lib/apt/lists/* \ No newline at end of file diff --git a/.devcontainer/devcontainer.json b/.devcontainer/devcontainer.json new file mode 100644 index 0000000..3913310 --- /dev/null +++ b/.devcontainer/devcontainer.json @@ -0,0 +1,28 @@ +// For format details, see https://aka.ms/vscode-remote/devcontainer.json or the definition README at +// https://github.com/microsoft/vscode-dev-containers/tree/master/containers/go +{ + "name": "Go", + "dockerFile": "Dockerfile", + "runArgs": [ + // Uncomment the next line to use a non-root user. See https://aka.ms/vscode-remote/containers/non-root-user. + // "-u", "1000", + + "--cap-add=SYS_PTRACE", "--security-opt", "seccomp=unconfined" + ], + + // Uncomment the next line if you want to publish any ports. + // "appPort": [], + + // Uncomment the next line to run commands after the container is created. + // "postCreateCommand": "go version", + + // Uncomment the next line to use a non-root user. See https://aka.ms/vscode-remote/containers/non-root-user. + // "runArgs": [ "-u", "1000" ], + + "extensions": [ + "ms-vscode.go" + ], + "settings": { + "go.gopath": "/go" + } +} \ No newline at end of file diff --git a/.gitignore b/.gitignore index e5db5e9..902bcb8 100644 --- a/.gitignore +++ b/.gitignore @@ -33,7 +33,7 @@ website/node_modules *.test *.iml examples/**/*.tfvars - +tf-solidfire-devrc.mk website/vendor terraform-provider-solidfire diff --git a/Dockerfile b/Dockerfile new file mode 100644 index 0000000..0d12c15 --- /dev/null +++ b/Dockerfile @@ -0,0 +1 @@ +from golang:latest diff --git a/GNUmakefile b/GNUmakefile index 7582883..540c6ba 100644 --- a/GNUmakefile +++ b/GNUmakefile @@ -14,7 +14,7 @@ test: fmtcheck xargs -t -n4 go test $(TESTARGS) -timeout=30s -parallel=4 testacc: fmtcheck - TF_ACC=1 go test $(TEST) -v $(TESTARGS) -timeout 120m + TF_ACC=1 go test $(TEST) -v $(TESTARGS) -timeout 60m vet: @echo "go vet ." diff --git a/go.mod b/go.mod index b6d603b..8a6d2a1 100644 --- a/go.mod +++ b/go.mod @@ -1,41 +1,14 @@ module github.com/sofixa/terraform-provider-solidfire +go 1.12 + require ( - github.com/armon/go-radix v1.0.0 - github.com/bgentry/speakeasy v0.1.0 - github.com/chzyer/readline v0.0.0-20170313234921-41eea22f717c - github.com/davecgh/go-spew v1.1.1 - github.com/fatih/structs v1.0.0 - github.com/hashicorp/atlas-go v0.0.0-20161107204910-1792bd8de119 - github.com/hashicorp/go-checkpoint v0.5.0 - github.com/hashicorp/go-cleanhttp v0.5.0 - github.com/hashicorp/go-getter v1.2.0 // indirect - github.com/hashicorp/go-hclog v0.0.0-20181001195459-61d530d6c27f - github.com/hashicorp/go-plugin v1.0.0 // indirect - github.com/hashicorp/go-version v1.2.0 // indirect - github.com/hashicorp/hcl v0.0.0-20170504190234-a4b07c25de5f - github.com/hashicorp/hil v0.0.0-20190212132231-97b3a9cdfa93 // indirect - github.com/hashicorp/logutils v1.0.0 - github.com/hashicorp/terraform v0.12.0-beta2 - github.com/kardianos/osext v0.0.0-20190222173326-2bc1f35cddc0 - github.com/mattn/go-colorable v0.1.1 - github.com/mattn/go-isatty v0.0.5 - github.com/mattn/go-shellwords v1.0.4 - github.com/mgutz/ansi v0.0.0-20170206155736-9520e82c474b - github.com/mitchellh/cli v1.0.0 - github.com/mitchellh/colorstring v0.0.0-20190213212951-d06e56a500db - github.com/mitchellh/go-homedir v1.1.0 // indirect - github.com/mitchellh/hashstructure v1.0.0 - github.com/mitchellh/panicwrap v0.0.0-20190213213626-17011010aaa4 - github.com/mitchellh/prefixedio v0.0.0-20190213213902-5733675afd51 - github.com/pmezard/go-difflib v1.0.0 - github.com/ryanuber/columnize v0.0.0-20170208171727-ddeb643de91b - github.com/sirupsen/logrus v1.4.1 + github.com/fatih/structs v1.1.0 + github.com/hashicorp/terraform v0.12.2 + github.com/mgutz/ansi v0.0.0-20170206155736-9520e82c474b // indirect + github.com/sirupsen/logrus v1.4.2 github.com/solidfire/terraform-provider-solidfire v0.0.0-20181019145605-e7042813e92a github.com/stretchr/testify v1.3.0 - github.com/vmware/govmomi v0.0.0-20170720170038-8ab1a62d9c08 github.com/x-cray/logrus-prefixed-formatter v0.5.2 - golang.org/x/sys v0.0.0-20190222072716-a9d3bda3a223 - google.golang.org/grpc v1.18.0 - gopkg.in/h2non/gock.v1 v1.0.4 + gopkg.in/h2non/gock.v1 v1.0.15 ) diff --git a/go.sum b/go.sum index d16fd87..9eb9120 100644 --- a/go.sum +++ b/go.sum @@ -13,14 +13,15 @@ github.com/Azure/go-autorest v10.15.4+incompatible/go.mod h1:r+4oMnoxhatjLLJ6zxS github.com/Azure/go-ntlmssp v0.0.0-20180810175552-4a21cbd618b4/go.mod h1:chxPXzSsl7ZWRAuOIE23GDNzjWuZquvFlgA8xmpunjU= github.com/BurntSushi/toml v0.3.1/go.mod h1:xHWCNGjB5oqiDr8zfno3MHue2Ht5sIBksp03qcyfWMU= github.com/ChrisTrenkamp/goxpath v0.0.0-20170922090931-c385f95c6022/go.mod h1:nuWgzSkT5PnyOd+272uUmV0dnAnAn42Mk7PiQC5VzN4= -github.com/Sirupsen/logrus v0.0.0-20170317143214-10f801ebc38b h1:rPRExiQXdUAAM9Y1ahb0oGVZzsD1vnK13PtAk5FcSL4= -github.com/Sirupsen/logrus v0.0.0-20170317143214-10f801ebc38b/go.mod h1:rmk17hk6i8ZSAJkSDa7nOxamrG+SP4P0mm+DAvExv4U= github.com/Unknwon/com v0.0.0-20151008135407-28b053d5a292/go.mod h1:KYCjqMOeHpNuTOiFQU6WEcTG7poCJrUs0YgyHNtn1no= github.com/abdullin/seq v0.0.0-20160510034733-d5467c17e7af/go.mod h1:5Jv4cbFiHJMsVxt52+i0Ha45fjshj6wxYr1r19tB9bw= github.com/agext/levenshtein v1.2.1/go.mod h1:JEDfjyjHDjOF/1e4FlBE/PkbqA9OfWu2ki2W0IB5558= github.com/agext/levenshtein v1.2.2 h1:0S/Yg6LYmFJ5stwQeRp6EeOcCbj7xiqQSdNelsXvaqE= github.com/agext/levenshtein v1.2.2/go.mod h1:JEDfjyjHDjOF/1e4FlBE/PkbqA9OfWu2ki2W0IB5558= github.com/agl/ed25519 v0.0.0-20150830182803-278e1ec8e8a6/go.mod h1:WPjqKcmVOxf0XSf3YxCJs6N6AOSrOx3obionmG7T0y0= +github.com/aliyun/alibaba-cloud-sdk-go v0.0.0-20190329064014-6e358769c32a/go.mod h1:T9M45xf79ahXVelWoOBmH0y4aC1t5kXO5BxwyakgIGA= +github.com/aliyun/aliyun-oss-go-sdk v0.0.0-20190103054945-8205d1f41e70/go.mod h1:T/Aws4fEfogEE9v+HPhhw+CntffsBHJ8nXQCwKr0/g8= +github.com/aliyun/aliyun-tablestore-go-sdk v4.1.2+incompatible/go.mod h1:LDQHRZylxvcg8H7wBIDfvO5g/cy4/sz1iucBlc2l3Jw= github.com/anmitsu/go-shlex v0.0.0-20161002113705-648efa622239/go.mod h1:2FmKhYUyUczH0OGQWaF5ceTx0UBShxjsH6f8oGKYe2c= github.com/antchfx/xpath v0.0.0-20190129040759-c8489ed3251e/go.mod h1:Yee4kTMuNiPYJ7nSNorELQMr1J33uOpXDMByNYhvtNk= github.com/antchfx/xquery v0.0.0-20180515051857-ad5b8c7a47b0/go.mod h1:LzD22aAzDP8/dyiCKFp31He4m2GPjl0AFyzDtZzUu9M= @@ -32,14 +33,14 @@ github.com/apparentlymart/go-textseg v1.0.0 h1:rRmlIsPEEhUTIKQb7T++Nz/A5Q6C9IuX2 github.com/apparentlymart/go-textseg v1.0.0/go.mod h1:z96Txxhf3xSFMPmb5X/1W05FF/Nj9VFpLOpjS5yuumk= github.com/armon/circbuf v0.0.0-20190214190532-5111143e8da2/go.mod h1:3U/XgcO3hCbHZ8TKRvWD2dDTCfh9M9ya+I9JpbB7O8o= github.com/armon/go-metrics v0.0.0-20180917152333-f0300d1749da/go.mod h1:Q73ZrmVTwzkszR9V5SSuryQ31EELlFMUz1kKyl939pY= -github.com/armon/go-radix v0.0.0-20170727155443-1fca145dffbc/go.mod h1:ufUuZ+zHj4x4TnLV4JWEpy2hxWSpsRywHrMgIH9cCH8= github.com/armon/go-radix v0.0.0-20180808171621-7fddfc383310/go.mod h1:ufUuZ+zHj4x4TnLV4JWEpy2hxWSpsRywHrMgIH9cCH8= github.com/armon/go-radix v1.0.0 h1:F4z6KzEeeQIMeLFa97iZU6vupzoecKdU5TX24SNppXI= github.com/armon/go-radix v1.0.0/go.mod h1:ufUuZ+zHj4x4TnLV4JWEpy2hxWSpsRywHrMgIH9cCH8= -github.com/aws/aws-sdk-go v1.15.78 h1:LaXy6lWR0YK7LKyuU0QWy2ws/LWTPfYV/UgfiBu4tvY= github.com/aws/aws-sdk-go v1.15.78/go.mod h1:E3/ieXAlvM0XWO57iftYVDLLvQ824smPP3ATZkfNZeM= -github.com/aws/aws-sdk-go v1.16.36 h1:POeH34ZME++pr7GBGh+ZO6Y5kOwSMQpqp5BGUgooJ6k= github.com/aws/aws-sdk-go v1.16.36/go.mod h1:KmX6BPdI08NWTb3/sm4ZGu5ShLoqVDhKgpiN924inxo= +github.com/aws/aws-sdk-go v1.19.18 h1:Hb3+b9HCqrOrbAtFstUWg7H5TQ+/EcklJtE8VShVs8o= +github.com/aws/aws-sdk-go v1.19.18/go.mod h1:KmX6BPdI08NWTb3/sm4ZGu5ShLoqVDhKgpiN924inxo= +github.com/baiyubin/aliyun-sts-go-sdk v0.0.0-20180326062324-cfa1a18b161f/go.mod h1:AuiFmCCPBSrqvVMvuqFuk0qogytodnVFVSN5CeJB8Gc= github.com/beorn7/perks v0.0.0-20180321164747-3a771d992973/go.mod h1:Dwedo/Wpr24TaqPxmxbtue+5NUziq4I4S80YR8gNf3Q= github.com/bgentry/go-netrc v0.0.0-20140422174119-9fd32a8b3d3d h1:xDfNPAt8lFiC1UJrqV3uuy861HCTo708pDMbjHHdCas= github.com/bgentry/go-netrc v0.0.0-20140422174119-9fd32a8b3d3d/go.mod h1:6QX/PXZ00z/TKoufEY6K/a0k6AhaJrQKdFe6OfVXsa4= @@ -61,7 +62,6 @@ github.com/coreos/etcd v3.3.10+incompatible/go.mod h1:uF7uidLiAD3TWHmW31ZFd/JWoc github.com/coreos/go-semver v0.2.0/go.mod h1:nnelYz7RCh+5ahJtPPxZlU+153eP4D4r3EedlOD2RNk= github.com/coreos/go-systemd v0.0.0-20181012123002-c6f51f82210d/go.mod h1:F5haX7vjVVG0kc13fIWeqUViNPyEJxv/OmvnBo0Yme4= github.com/coreos/pkg v0.0.0-20180928190104-399ea9e2e55f/go.mod h1:E3G3o1h8I7cfcXa63jLwjI0eiQQMgzzUDFVpN/nH/eA= -github.com/davecgh/go-spew v1.1.0 h1:ZDRjVQ15GmhC3fiQ8ni8+OwkZQO4DARzQgrnXU1Liz8= github.com/davecgh/go-spew v1.1.0/go.mod h1:J7Y8YcW2NihsgmVo/mv3lAwl/skON4iLHjSsI+c5H38= github.com/davecgh/go-spew v1.1.1 h1:vj9j/u1bqnvCEfJOwUhtlOARqs3+rkHYY13jYWTU97c= github.com/davecgh/go-spew v1.1.1/go.mod h1:J7Y8YcW2NihsgmVo/mv3lAwl/skON4iLHjSsI+c5H38= @@ -73,12 +73,14 @@ github.com/dylanmei/iso8601 v0.1.0/go.mod h1:w9KhXSgIyROl1DefbMYIE7UVSIvELTbMrCf github.com/dylanmei/winrmtest v0.0.0-20190225150635-99b7fe2fddf1/go.mod h1:lcy9/2gH1jn/VCLouHA6tOEwLoNVd4GW6zhuKLmHC2Y= github.com/fatih/color v1.7.0 h1:DkWD4oS2D8LGGgTQ6IvwJJXSL5Vp2ffcQg58nFV38Ys= github.com/fatih/color v1.7.0/go.mod h1:Zm6kSWBoL9eyXnKyktHP6abPY2pDugNf5KwzbycvMj4= -github.com/fatih/structs v1.0.0 h1:BrX964Rv5uQ3wwS+KRUAJCBBw5PQmgJfJ6v4yly5QwU= github.com/fatih/structs v1.0.0/go.mod h1:9NiDSp5zOcgEDl+j00MP/WkGVPOlPRLejGD8Ga6PJ7M= +github.com/fatih/structs v1.1.0 h1:Q7juDM0QtcnhCpeyLGQKyg4TOIghuNXrkL32pHAUMxo= +github.com/fatih/structs v1.1.0/go.mod h1:9NiDSp5zOcgEDl+j00MP/WkGVPOlPRLejGD8Ga6PJ7M= github.com/flynn/go-shlex v0.0.0-20150515145356-3f9db97f8568/go.mod h1:xEzjJPgXI435gkrCt3MPfRiAkVrwSbHsst4LCFVfpJc= github.com/fsnotify/fsnotify v1.4.7/go.mod h1:jwhsz4b93w/PPRr/qN1Yymfu8t87LnFCMoQvtojpjFo= github.com/ghodss/yaml v1.0.0/go.mod h1:4dBDuWmgqj2HViK6kFavaiC9ZROes6MMH2rRYeMEF04= github.com/gliderlabs/ssh v0.1.1/go.mod h1:U7qILu1NlMHj9FlMhZLlkCdDnU1DBEAqr0aevW3Awn0= +github.com/go-test/deep v1.0.1 h1:UQhStjbkDClarlmv0am7OXXO4/GaPdCGiUiMTvi28sg= github.com/go-test/deep v1.0.1/go.mod h1:wGDj63lr65AM2AQyKZd/NYHGb0R+1RLqB8NKt3aSFNA= github.com/gogo/protobuf v1.1.1/go.mod h1:r8qH/GZQm5c6nD/R0oafs1akxWv10x8SbQlK7atdtwQ= github.com/gogo/protobuf v1.2.0/go.mod h1:r8qH/GZQm5c6nD/R0oafs1akxWv10x8SbQlK7atdtwQ= @@ -87,15 +89,17 @@ github.com/golang/groupcache v0.0.0-20180513044358-24b0969c4cb7/go.mod h1:cIg4er github.com/golang/lint v0.0.0-20180702182130-06c8688daad7/go.mod h1:tluoj9z5200jBnyusfRPU2LqT6J+DAorxEvtC7LHB+E= github.com/golang/mock v1.1.1/go.mod h1:oTYuIxOrZwtPieC+H1uAHpcLFnEyAGVDL/k47Jfbm0A= github.com/golang/mock v1.2.0/go.mod h1:oTYuIxOrZwtPieC+H1uAHpcLFnEyAGVDL/k47Jfbm0A= +github.com/golang/mock v1.3.1 h1:qGJ6qTW+x6xX/my+8YUVl4WNpX9B7+/l2tRsHGZ7f2s= +github.com/golang/mock v1.3.1/go.mod h1:sBzyDLLjw3U8JLTeZvSv8jJB+tU5PVekmnlKIyFUx0Y= github.com/golang/protobuf v1.1.0/go.mod h1:6lQm79b+lXiMfvg/cZm0SGofjICqVBUtrP5yJMmIC1U= -github.com/golang/protobuf v1.2.0 h1:P3YflyNX/ehuJFLhxviNdFxQPkGK5cDcApsge1SqnvM= github.com/golang/protobuf v1.2.0/go.mod h1:6lQm79b+lXiMfvg/cZm0SGofjICqVBUtrP5yJMmIC1U= github.com/golang/protobuf v1.3.0 h1:kbxbvI4Un1LUWKxufD+BiE6AEExYYgkQLQmLFqA1LFk= github.com/golang/protobuf v1.3.0/go.mod h1:Qd/q+1AKNOZr9uGQzbzCmRO6sUih6GTPZv6a1/R87v0= github.com/golang/snappy v0.0.0-20180518054509-2e65f85255db/go.mod h1:/XxbfmMg8lxefKM7IXC3fBNl/7bRcc72aCRzEWrmP2Q= github.com/google/btree v0.0.0-20180813153112-4030bb1f1f0c/go.mod h1:lNA+9X1NB3Zf8V7Ke586lFgjr2dZNuvo3lPJSGZ5JPQ= -github.com/google/go-cmp v0.2.0 h1:+dTQ8DZQJz0Mb/HjFlkptS1FeQ4cWSnN941F8aEG4SQ= github.com/google/go-cmp v0.2.0/go.mod h1:oXzfMopK8JAjlY9xF4vHSVASa0yLyX7SntLO5aqRK0M= +github.com/google/go-cmp v0.3.0 h1:crn/baboCvb5fXaQ0IJ1SGTsTVrWpDsCWC8EGETZijY= +github.com/google/go-cmp v0.3.0/go.mod h1:8QqcDgzrUqlUb/G2PQTWiueGozuR1884gddMywk6iLU= github.com/google/go-github v17.0.0+incompatible/go.mod h1:zLgOLi98H3fifZn+44m+umXrS52loVEgC2AApnigrVQ= github.com/google/go-querystring v1.0.0/go.mod h1:odCYkC5MyYFN7vkCjXpyrEuKhc/BUO6wN/zVPAxq5ck= github.com/google/martian v2.1.0+incompatible/go.mod h1:9I4somxYTbIHy5NJKHRl3wXiIaQGbYVAs8BPL6v8lEs= @@ -113,6 +117,8 @@ github.com/grpc-ecosystem/go-grpc-middleware v1.0.0/go.mod h1:FiyG127CGDf3tlThmg github.com/grpc-ecosystem/go-grpc-prometheus v1.2.0/go.mod h1:8NvIoxWQoOIhqOTXgfV/d3M/q6VIi02HzZEHgUlZvzk= github.com/grpc-ecosystem/grpc-gateway v1.5.0/go.mod h1:RSKVYQBd5MCa4OVpNdGskqpgL2+G+NZTnrVHpWWfpdw= github.com/grpc-ecosystem/grpc-gateway v1.5.1/go.mod h1:RSKVYQBd5MCa4OVpNdGskqpgL2+G+NZTnrVHpWWfpdw= +github.com/h2non/parth v0.0.0-20190131123155-b4df798d6542 h1:2VTzZjLZBgl62/EtslCrtky5vbi9dd7HrQPQIx6wqiw= +github.com/h2non/parth v0.0.0-20190131123155-b4df798d6542/go.mod h1:Ow0tF8D4Kplbc8s8sSb3V2oUCygFHVp8gC3Dn6U4MNI= github.com/hashicorp/atlas-go v0.0.0-20161107204910-1792bd8de119/go.mod h1:ckHDuH0pxfnmXZkq1niVSguIIV0pA65gifQv3so9llw= github.com/hashicorp/aws-sdk-go-base v0.2.0/go.mod h1:ZIWACGGi0N7a4DZbf15yuE1JQORmWLtBcVM6F5SXNFU= github.com/hashicorp/consul v0.0.0-20171026175957-610f3c86a089/go.mod h1:mFrjN1mfidgJfYP1xrJCF+AfRhr6Eaqhb2+sfyn/OOI= @@ -120,27 +126,26 @@ github.com/hashicorp/errwrap v0.0.0-20180715044906-d6c0cd880357/go.mod h1:YH+1FK github.com/hashicorp/errwrap v1.0.0 h1:hLrqtEDnRye3+sgx6z4qVLNuviH3MR5aQ0ykNJa/UYA= github.com/hashicorp/errwrap v1.0.0/go.mod h1:YH+1FKiLXxHSkmPseP+kNlulaMuP3n2brvKWEqk/Jc4= github.com/hashicorp/go-azure-helpers v0.0.0-20190129193224-166dfd221bb2/go.mod h1:lu62V//auUow6k0IykxLK2DCNW8qTmpm8KqhYVWattA= -github.com/hashicorp/go-checkpoint v0.0.0-20160816195056-f8cfd20c5350/go.mod h1:xIwEieBHERyEvaeKF/TcHh1Hu+lxPM+n2vT1+g9I4m4= github.com/hashicorp/go-checkpoint v0.5.0/go.mod h1:7nfLNL10NsxqO4iWuW6tWW0HjZuDrwkBuEQsVcpCOgg= -github.com/hashicorp/go-cleanhttp v0.0.0-20171218145408-d5fe4b57a186/go.mod h1:JpRdi6/HCYpAwUzNwuwqhbovhLtngrth3wmdIIUrZ80= github.com/hashicorp/go-cleanhttp v0.5.0 h1:wvCrVc9TjDls6+YGAF2hAifE1E5U1+b4tH6KdvN3Gig= github.com/hashicorp/go-cleanhttp v0.5.0/go.mod h1:JpRdi6/HCYpAwUzNwuwqhbovhLtngrth3wmdIIUrZ80= github.com/hashicorp/go-getter v1.1.0/go.mod h1:q+PoBhh16brIKwJS9kt18jEtXHTg2EGkmrA9P7HVS+U= -github.com/hashicorp/go-getter v1.2.0 h1:hJgdGKJUdQ2T1AAq60tXTKsmQMd/v/GqlnIqfZ5ylbk= github.com/hashicorp/go-getter v1.2.0/go.mod h1:/O1k/AizTN0QmfEKknCYGvICeyKUDqCYA8vvWtGWDeQ= -github.com/hashicorp/go-hclog v0.0.0-20171005151751-ca137eb4b438/go.mod h1:9bjs9uLqI8l75knNv3lV1kA55veR+WUPSiKIWcQHudI= -github.com/hashicorp/go-hclog v0.0.0-20180709165350-ff2cf002a8dd h1:rNuUHR+CvK1IS89MMtcF0EpcVMZtjKfPRp4MEmt/aTs= +github.com/hashicorp/go-getter v1.3.0 h1:pFMSFlI9l5NaeuzkpE3L7BYk9qQ9juTAgXW/H0cqxcU= +github.com/hashicorp/go-getter v1.3.0/go.mod h1:/O1k/AizTN0QmfEKknCYGvICeyKUDqCYA8vvWtGWDeQ= github.com/hashicorp/go-hclog v0.0.0-20180709165350-ff2cf002a8dd/go.mod h1:9bjs9uLqI8l75knNv3lV1kA55veR+WUPSiKIWcQHudI= github.com/hashicorp/go-hclog v0.0.0-20181001195459-61d530d6c27f h1:Yv9YzBlAETjy6AOX9eLBZ3nshNVRREgerT/3nvxlGho= github.com/hashicorp/go-hclog v0.0.0-20181001195459-61d530d6c27f/go.mod h1:5CU+agLiy3J7N7QjHK5d05KxGsuXiQLrjA0H7acj2lQ= github.com/hashicorp/go-immutable-radix v0.0.0-20180129170900-7f3cd4390caa/go.mod h1:6ij3Z20p+OhOkCSrA0gImAWoHYQRGbnlcuk6XYTiaRw= github.com/hashicorp/go-msgpack v0.0.0-20150518234257-fa3f63826f7c/go.mod h1:ahLV/dePpqEmjfWmKiqvPkv/twdG7iPBM1vqhUKIvfM= +github.com/hashicorp/go-msgpack v0.5.4/go.mod h1:ahLV/dePpqEmjfWmKiqvPkv/twdG7iPBM1vqhUKIvfM= github.com/hashicorp/go-multierror v0.0.0-20180717150148-3d5d8f294aa0/go.mod h1:JMRHfdO9jKNzS/+BTlxCjKNQHg/jZAft8U7LloJvN7I= github.com/hashicorp/go-multierror v1.0.0 h1:iVjPR7a6H0tWELX5NxNe7bYopibicUzc7uPribsnS6o= github.com/hashicorp/go-multierror v1.0.0/go.mod h1:dHtQlpGsu+cZNNAkkCN/P3hoUDHhCYQXV3UM06sGGrk= github.com/hashicorp/go-plugin v0.0.0-20190322172744-52e1c4730856/go.mod h1:++UyYGoz3o5w9ZzAdZxtQKrWWP+iqPBn3cQptSMzBuY= -github.com/hashicorp/go-plugin v1.0.0 h1:/gQ1sNR8/LHpoxKRQq4PmLBuacfZb4tC93e9B30o/7c= github.com/hashicorp/go-plugin v1.0.0/go.mod h1:++UyYGoz3o5w9ZzAdZxtQKrWWP+iqPBn3cQptSMzBuY= +github.com/hashicorp/go-plugin v1.0.1-0.20190610192547-a1bc61569a26 h1:hRho44SAoNu1CBtn5r8Q9J3rCs4ZverWZ4R+UeeNuWM= +github.com/hashicorp/go-plugin v1.0.1-0.20190610192547-a1bc61569a26/go.mod h1:++UyYGoz3o5w9ZzAdZxtQKrWWP+iqPBn3cQptSMzBuY= github.com/hashicorp/go-retryablehttp v0.5.2/go.mod h1:9B5zBasrRhHXnJnui7y6sL7es7NDiJgTc6Er0maI1Xs= github.com/hashicorp/go-rootcerts v1.0.0/go.mod h1:K6zTfqpRlCUIjkwsN4Z+hiSfzSTQa6eBIzfwKfwNnHU= github.com/hashicorp/go-safetemp v1.0.0 h1:2HR189eFNrjHQyENnQMMpCiBAsRxzbTMIgBhEyExpmo= @@ -148,49 +153,46 @@ github.com/hashicorp/go-safetemp v1.0.0/go.mod h1:oaerMy3BhqiTbVye6QuFhFtIceqFoD github.com/hashicorp/go-slug v0.3.0/go.mod h1:I5tq5Lv0E2xcNXNkmx7BSfzi1PsJ2cNjs3cC3LwyhK8= github.com/hashicorp/go-sockaddr v0.0.0-20180320115054-6d291a969b86/go.mod h1:7Xibr9yA9JjQq1JpNB2Vw7kxv8xerXegt+ozgdvDeDU= github.com/hashicorp/go-tfe v0.3.14/go.mod h1:SuPHR+OcxvzBZNye7nGPfwZTEyd3rWPfLVbCgyZPezM= +github.com/hashicorp/go-tfe v0.3.16/go.mod h1:SuPHR+OcxvzBZNye7nGPfwZTEyd3rWPfLVbCgyZPezM= github.com/hashicorp/go-uuid v1.0.0/go.mod h1:6SBZvOh/SIDV7/2o3Jml5SYk/TvGqwFJ/bN7x4byOro= github.com/hashicorp/go-uuid v1.0.1 h1:fv1ep09latC32wFoVwnqcnKJGnMSdBanPczbHAYm1BE= github.com/hashicorp/go-uuid v1.0.1/go.mod h1:6SBZvOh/SIDV7/2o3Jml5SYk/TvGqwFJ/bN7x4byOro= +github.com/hashicorp/go-version v1.1.0 h1:bPIoEKD27tNdebFGGxxYwcL4nepeY4j1QP23PFRGzg0= github.com/hashicorp/go-version v1.1.0/go.mod h1:fltr4n8CU8Ke44wwGCBoEymUuxUHl09ZGVZPK5anwXA= -github.com/hashicorp/go-version v1.2.0 h1:3vNe/fWF5CBgRIguda1meWhsZHy3m8gCJ5wx+dIzX/E= github.com/hashicorp/go-version v1.2.0/go.mod h1:fltr4n8CU8Ke44wwGCBoEymUuxUHl09ZGVZPK5anwXA= github.com/hashicorp/golang-lru v0.5.0/go.mod h1:/m3WP610KZHVQ1SGc6re/UDhFvYD7pJ4Ao+sR/qLZy8= -github.com/hashicorp/hcl v0.0.0-20170217164738-630949a3c5fa h1:10wM7X2JKPrmcvtI9Qy2xsoQI1CBA8dd6LqjyGKlD0c= -github.com/hashicorp/hcl v0.0.0-20170217164738-630949a3c5fa/go.mod h1:oZtUIOe8dh44I2q6ScRibXws4Ajl+d+nod3AaR9vL5w= github.com/hashicorp/hcl v0.0.0-20170504190234-a4b07c25de5f h1:UdxlrJz4JOnY8W+DbLISwf2B8WXEolNRA8BGCwI9jws= github.com/hashicorp/hcl v0.0.0-20170504190234-a4b07c25de5f/go.mod h1:oZtUIOe8dh44I2q6ScRibXws4Ajl+d+nod3AaR9vL5w= github.com/hashicorp/hcl2 v0.0.0-20181208003705-670926858200/go.mod h1:ShfpTh661oAaxo7VcNxg0zcZW6jvMa7Moy2oFx7e5dE= -github.com/hashicorp/hcl2 v0.0.0-20190416162332-2c5a4b7d729a h1:doKt9ZBCYgYQrGK6CqJsEB+8xqm3WoFyKu4TPZlyymg= github.com/hashicorp/hcl2 v0.0.0-20190416162332-2c5a4b7d729a/go.mod h1:HtEzazM5AZ9fviNEof8QZB4T1Vz9UhHrGhnMPzl//Ek= +github.com/hashicorp/hcl2 v0.0.0-20190515223218-4b22149b7cef h1:xZRvbcwHY8zhaxDwgkmpAp2emwZkVn7p3gat0zhq2X0= +github.com/hashicorp/hcl2 v0.0.0-20190515223218-4b22149b7cef/go.mod h1:4oI94iqF3GB10QScn46WqbG0kgTUpha97SAzzg2+2ec= +github.com/hashicorp/hil v0.0.0-20190212112733-ab17b08d6590 h1:2yzhWGdgQUWZUCNK+AoO35V+HTsgEmcM4J9IkArh7PI= github.com/hashicorp/hil v0.0.0-20190212112733-ab17b08d6590/go.mod h1:n2TSygSNwsLJ76m8qFXTSc7beTb+auJxYdqrnoqwZWE= -github.com/hashicorp/hil v0.0.0-20190212132231-97b3a9cdfa93 h1:T1Q6ag9tCwun16AW+XK3tAql24P4uTGUMIn1/92WsQQ= github.com/hashicorp/hil v0.0.0-20190212132231-97b3a9cdfa93/go.mod h1:n2TSygSNwsLJ76m8qFXTSc7beTb+auJxYdqrnoqwZWE= -github.com/hashicorp/logutils v0.0.0-20150609070431-0dc08b1671f3 h1:oD64EFjELI9RY9yoWlfua58r+etdnoIC871z+rr6lkA= -github.com/hashicorp/logutils v0.0.0-20150609070431-0dc08b1671f3/go.mod h1:QIAnNjmIWmVIIkWDTG1z5v++HQmx9WQRO+LraFDTW64= github.com/hashicorp/logutils v1.0.0 h1:dLEQVugN8vlakKOUE3ihGLTZJRB4j+M2cdTm/ORI65Y= github.com/hashicorp/logutils v1.0.0/go.mod h1:QIAnNjmIWmVIIkWDTG1z5v++HQmx9WQRO+LraFDTW64= github.com/hashicorp/memberlist v0.1.0/go.mod h1:ncdBp14cuox2iFOq3kDiquKU6fqsTBc3W6JvZwjxxsE= github.com/hashicorp/serf v0.0.0-20160124182025-e4ec8cc423bb/go.mod h1:h/Ru6tmZazX7WO/GDmwdpS975F019L4t5ng5IgwbNrE= -github.com/hashicorp/terraform v0.9.2 h1:1yf6/OxQjEV2lKkjB7dHBEM2osEFJxcnsNasNNAVn9g= -github.com/hashicorp/terraform v0.9.2/go.mod h1:uN1KUiT7Wdg61fPwsGXQwK3c8PmpIVZrt5Vcb1VrSoM= -github.com/hashicorp/terraform v0.12.0-beta2 h1:hnNERDRVjTO9CWQtrPnNY7bjVWHE9HcSpUlWYTTUY+8= github.com/hashicorp/terraform v0.12.0-beta2/go.mod h1:A3NsI7WT87OMgpcD15cu6dK2YNpihchZp5fxUf8EHBg= +github.com/hashicorp/terraform v0.12.2 h1:P5yMdQc+IYEc+fWw3olShmKdbBiCN7DtPjVz+GieBpk= +github.com/hashicorp/terraform v0.12.2/go.mod h1:4MELVjPGm2DO5bK9E7jPXM5F+1pkvT4fYJYtMcQ2CMs= github.com/hashicorp/terraform-config-inspect v0.0.0-20190327195015-8022a2663a70 h1:oZm5nE11yhzsTRz/YrUyDMSvixePqjoZihwn8ipuOYI= github.com/hashicorp/terraform-config-inspect v0.0.0-20190327195015-8022a2663a70/go.mod h1:ItvqtvbC3K23FFET62ZwnkwtpbKZm8t8eMcWjmVVjD8= github.com/hashicorp/vault v0.10.4/go.mod h1:KfSyffbKxoVyspOdlaGVjIuwLobi07qD1bAbosPMpP0= github.com/hashicorp/yamux v0.0.0-20180604194846-3520598351bb h1:b5rjCoWHc7eqmAS4/qyk21ZsHyb6Mxv/jykxvNTkU4M= github.com/hashicorp/yamux v0.0.0-20180604194846-3520598351bb/go.mod h1:+NfK9FKeTrX5uv1uIXGdwYDTeHna2qgaIlx54MXqjAM= +github.com/hpcloud/tail v1.0.0 h1:nfCOvKYfkgYP8hkirhJocXT2+zOD8yUNjXaWfTlyFKI= github.com/hpcloud/tail v1.0.0/go.mod h1:ab1qPbhIpdTxEkNHXyeSf5vhxWSCs/tWer42PpOxQnU= github.com/jellevandenhooff/dkim v0.0.0-20150330215556-f50fe3d243e1/go.mod h1:E0B/fFc00Y+Rasa88328GlI/XbtyysCtTHZS8h7IrBU= github.com/jessevdk/go-flags v1.4.0/go.mod h1:4FA24M0QyGHXBuZZK/XkWh8h0e1EYbRYJSGM75WSRxI= -github.com/jmespath/go-jmespath v0.0.0-20160202185014-0b12d6b521d8 h1:12VvqtR6Aowv3l/EQUlocDHW2Cp4G9WJVH7uyH8QFJE= github.com/jmespath/go-jmespath v0.0.0-20160202185014-0b12d6b521d8/go.mod h1:Nht3zPeWKUH0NzdCt2Blrr5ys8VGpn0CEB0cQHVjt7k= github.com/jmespath/go-jmespath v0.0.0-20180206201540-c2b33e8439af h1:pmfjZENx5imkbgOkpRUYLnmbU7UEFbjtDA2hxJ1ichM= github.com/jmespath/go-jmespath v0.0.0-20180206201540-c2b33e8439af/go.mod h1:Nht3zPeWKUH0NzdCt2Blrr5ys8VGpn0CEB0cQHVjt7k= github.com/jonboulle/clockwork v0.1.0/go.mod h1:Ii8DK3G1RaLaWxj9trq07+26W01tbo22gdxWY5EU2bo= github.com/joyent/triton-go v0.0.0-20180313100802-d8f9c0314926/go.mod h1:U+RSyWxWd04xTqnuOQxnai7XGS2PrPY2cfGoDKtMHjA= +github.com/json-iterator/go v1.1.5/go.mod h1:+SdeFBvtyEkXs7REEP0seUULqWtbJapLOCVDaaPEHmU= github.com/jtolds/gls v4.2.1+incompatible/go.mod h1:QJZ7F/aHp+rZTRtaJ1ow/lLfFfVYBRgL+9YlvaHOwJU= -github.com/kardianos/osext v0.0.0-20170309185600-9d302b58e975/go.mod h1:1NbS8ALrpOvjt0rHPNLyCIeMtbizbir8U//inJ+zuB8= github.com/kardianos/osext v0.0.0-20170510131534-ae77be60afb1/go.mod h1:1NbS8ALrpOvjt0rHPNLyCIeMtbizbir8U//inJ+zuB8= github.com/kardianos/osext v0.0.0-20190222173326-2bc1f35cddc0/go.mod h1:1NbS8ALrpOvjt0rHPNLyCIeMtbizbir8U//inJ+zuB8= github.com/keybase/go-crypto v0.0.0-20161004153544-93f5b35093ba/go.mod h1:ghbZscTyKdM07+Fw3KSi0hcJm+AlEUWj8QLlPtijN/M= @@ -207,36 +209,28 @@ github.com/lusis/go-artifactory v0.0.0-20160115162124-7e4ce345df82/go.mod h1:y54 github.com/marstr/guid v1.1.0/go.mod h1:74gB1z2wpxxInTG6yaqA7KrtM0NZ+RbrcqDvYHefzho= github.com/masterzen/simplexml v0.0.0-20160608183007-4572e39b1ab9/go.mod h1:kCEbxUJlNDEBNbdQMkPSp6yaKcRXVI6f4ddk8Riv4bc= github.com/masterzen/winrm v0.0.0-20190223112901-5e5c9a7fe54b/go.mod h1:wr1VqkwW0AB5JS0QLy5GpVMS9E3VtRoSYXUYyVk46KY= -github.com/mattn/go-colorable v0.0.0-20170327083344-ded68f7a9561 h1:isR/L+BIZ+rqODWYR/f526ygrBMGKZYFhaaFRDGvuZ8= -github.com/mattn/go-colorable v0.0.0-20170327083344-ded68f7a9561/go.mod h1:9vuHe8Xs5qXnSaW/c/ABM9alt+Vo+STaOChaDxuIBZU= -github.com/mattn/go-colorable v0.0.9 h1:UVL0vNpWh04HeJXV0KLcaT7r06gOH2l4OW6ddYRUIY4= github.com/mattn/go-colorable v0.0.9/go.mod h1:9vuHe8Xs5qXnSaW/c/ABM9alt+Vo+STaOChaDxuIBZU= github.com/mattn/go-colorable v0.1.1 h1:G1f5SKeVxmagw/IyvzvtZE4Gybcc4Tr1tf7I8z0XgOg= github.com/mattn/go-colorable v0.1.1/go.mod h1:FuOcm+DKB9mbwrcAfNl7/TZVBZ6rcnceauSikq3lYCQ= -github.com/mattn/go-isatty v0.0.2/go.mod h1:M+lRXTBqGeGNdLjl/ufCoiOlB5xdOkqRJdNxMWT7Zi4= github.com/mattn/go-isatty v0.0.3/go.mod h1:M+lRXTBqGeGNdLjl/ufCoiOlB5xdOkqRJdNxMWT7Zi4= -github.com/mattn/go-isatty v0.0.4 h1:bnP0vzxcAdeI1zdubAl5PjU6zsERjGZb7raWodagDYs= github.com/mattn/go-isatty v0.0.4/go.mod h1:M+lRXTBqGeGNdLjl/ufCoiOlB5xdOkqRJdNxMWT7Zi4= github.com/mattn/go-isatty v0.0.5 h1:tHXDdz1cpzGaovsTB+TVB8q90WEokoVmfMqoVcrLUgw= github.com/mattn/go-isatty v0.0.5/go.mod h1:Iq45c/XA43vh69/j3iqttzPXn0bhXyGjM0Hdxcsrc5s= github.com/mattn/go-runewidth v0.0.4/go.mod h1:LwmH8dsx7+W8Uxz3IHJYH5QSwggIsqBzpuz5H//U1FU= -github.com/mattn/go-shellwords v1.0.2/go.mod h1:3xCvwCdWdlDJUrvuMn7Wuy9eWs4pE8vqg+NOMyg4B2o= github.com/mattn/go-shellwords v1.0.4/go.mod h1:3xCvwCdWdlDJUrvuMn7Wuy9eWs4pE8vqg+NOMyg4B2o= github.com/matttproud/golang_protobuf_extensions v1.0.1/go.mod h1:D8He9yQNgCq6Z5Ld7szi9bcBfOoFv/3dc6xSMkL2PC0= github.com/mgutz/ansi v0.0.0-20170206155736-9520e82c474b h1:j7+1HpAFS1zy5+Q4qx1fWh90gTKwiN4QCGoY9TWyyO4= github.com/mgutz/ansi v0.0.0-20170206155736-9520e82c474b/go.mod h1:01TrycV0kFyexm33Z7vhZRXopbI8J3TDReVlkTgMUxE= github.com/microcosm-cc/bluemonday v1.0.1/go.mod h1:hsXNsILzKxV+sX77C5b8FSuKF00vh2OMYv+xgHpAMF4= github.com/miekg/dns v1.0.8/go.mod h1:W1PPwlIAgtquWBMBEV9nkV9Cazfe8ScdGz/Lj7v3Nrg= -github.com/mitchellh/cli v0.0.0-20170328052352-ee8578a9c12a/go.mod h1:oGumspjLm2kTyiT1QMGpFqRlmxnKHfCvhZEVnx+5UeE= github.com/mitchellh/cli v1.0.0 h1:iGBIsUe3+HZ/AD/Vd7DErOt5sU9fa8Uj7A2s1aggv1Y= github.com/mitchellh/cli v1.0.0/go.mod h1:hNIlj7HEI86fIcpObd7a0FcrxTWetlwJDGcceTlRvqc= -github.com/mitchellh/colorstring v0.0.0-20150917214807-8631ce90f286/go.mod h1:l0dey0ia/Uv7NcFFVbCLtqEBQbrT4OCwCSKTEv6enCw= github.com/mitchellh/colorstring v0.0.0-20190213212951-d06e56a500db h1:62I3jR2EmQ4l5rM/4FEfDWcRD+abF5XlKShorW5LRoQ= github.com/mitchellh/colorstring v0.0.0-20190213212951-d06e56a500db/go.mod h1:l0dey0ia/Uv7NcFFVbCLtqEBQbrT4OCwCSKTEv6enCw= github.com/mitchellh/copystructure v1.0.0 h1:Laisrj+bAB6b/yJwB5Bt3ITZhGJdqmxquMKeZ+mmkFQ= github.com/mitchellh/copystructure v1.0.0/go.mod h1:SNtv71yrdKgLRyLFxmLdkAbkKEFWgYaq1OVrnRcwhnw= +github.com/mitchellh/go-homedir v1.0.0 h1:vKb8ShqSby24Yrqr/yDYkuFz8d0WUjys40rvnGC8aR0= github.com/mitchellh/go-homedir v1.0.0/go.mod h1:SfyaCUpYCn1Vlf4IUYiD9fPX4A5wJrkLzIz1N1q0pr0= -github.com/mitchellh/go-homedir v1.1.0 h1:lukF9ziXFxDFPkA1vsr5zpc1XuPDn/wFntq5mG+4E0Y= github.com/mitchellh/go-homedir v1.1.0/go.mod h1:SfyaCUpYCn1Vlf4IUYiD9fPX4A5wJrkLzIz1N1q0pr0= github.com/mitchellh/go-linereader v0.0.0-20190213213312-1b945b3263eb/go.mod h1:OaY7UOoTkkrX3wRwjpYRKafIkkyeD0UtweSHAWWiqQM= github.com/mitchellh/go-testing-interface v0.0.0-20171004221916-a61a99592b77/go.mod h1:kRemZodwjscx+RGhAo8eIhFbs2+BFgRtFPeD/KE+zxI= @@ -245,25 +239,27 @@ github.com/mitchellh/go-testing-interface v1.0.0/go.mod h1:kRemZodwjscx+RGhAo8eI github.com/mitchellh/go-wordwrap v0.0.0-20150314170334-ad45545899c7/go.mod h1:ZXFpozHsX6DPmq2I0TCekCxypsnAUbP2oI0UX1GXzOo= github.com/mitchellh/go-wordwrap v1.0.0 h1:6GlHJ/LTGMrIJbwgdqdl2eEH8o+Exx/0m8ir9Gns0u4= github.com/mitchellh/go-wordwrap v1.0.0/go.mod h1:ZXFpozHsX6DPmq2I0TCekCxypsnAUbP2oI0UX1GXzOo= -github.com/mitchellh/hashstructure v0.0.0-20170116052023-ab25296c0f51 h1:qdHlMllk/PTLUrX3XdtXDrLL1lPSfcqUmJD1eYfbapg= -github.com/mitchellh/hashstructure v0.0.0-20170116052023-ab25296c0f51/go.mod h1:QjSHrPWS+BGUVBYkbTZWEnOh3G1DutKwClXU/ABz6AQ= github.com/mitchellh/hashstructure v1.0.0 h1:ZkRJX1CyOoTkar7p/mLS5TZU4nJ1Rn/F8u9dGS02Q3Y= github.com/mitchellh/hashstructure v1.0.0/go.mod h1:QjSHrPWS+BGUVBYkbTZWEnOh3G1DutKwClXU/ABz6AQ= github.com/mitchellh/mapstructure v1.1.2 h1:fmNYVwqnSfB9mZU6OS2O6GsXM+wcskZDuKQzvN1EDeE= github.com/mitchellh/mapstructure v1.1.2/go.mod h1:FVVH3fgwuzCH5S8UJGiWEs2h04kUh9fWfEaFds41c1Y= -github.com/mitchellh/panicwrap v0.0.0-20170106182340-fce601fe5557/go.mod h1:QuAqW7/z+iv6aWFJdrA8kCbsF0OOJVKCICqTcYBexuY= github.com/mitchellh/panicwrap v0.0.0-20190213213626-17011010aaa4/go.mod h1:YYMf4xtQnR8LRC0vKi3afvQ5QwRPQ17zjcpkBCufb+I= -github.com/mitchellh/prefixedio v0.0.0-20151214002211-6e6954073784/go.mod h1:kB1naBgV9ORnkiTVeyJOI1DavaJkG4oNIq0Af6ZVKUo= github.com/mitchellh/prefixedio v0.0.0-20190213213902-5733675afd51/go.mod h1:kB1naBgV9ORnkiTVeyJOI1DavaJkG4oNIq0Af6ZVKUo= github.com/mitchellh/reflectwalk v1.0.0 h1:9D+8oIskB4VJBN5SFlmc27fSlIBZaov1Wpk/IfikLNY= github.com/mitchellh/reflectwalk v1.0.0/go.mod h1:mSTlrgnPZtwu0c4WaC2kGObEpuNDbx0jmZXqmk4esnw= +github.com/modern-go/concurrent v0.0.0-20180306012644-bacd9c7ef1dd/go.mod h1:6dJC0mAP4ikYIbvyc7fijjWJddQyLn8Ig3JB5CqoB9Q= +github.com/modern-go/reflect2 v1.0.1/go.mod h1:bx2lNnkwVCuqBIxFjflWJWanXIb3RllmbCylyMrvgv0= +github.com/nbio/st v0.0.0-20140626010706-e9e8d9816f32 h1:W6apQkHrMkS0Muv8G/TipAy/FJl/rCYT0+EuS8+Z0z4= +github.com/nbio/st v0.0.0-20140626010706-e9e8d9816f32/go.mod h1:9wM+0iRr9ahx58uYLpLIr5fm8diHn0JbqRycJi6w0Ms= github.com/neelance/astrewrite v0.0.0-20160511093645-99348263ae86/go.mod h1:kHJEU3ofeGjhHklVoIGuVj85JJwZ6kWPaJwCIxgnFmo= github.com/neelance/sourcemap v0.0.0-20151028013722-8c68805598ab/go.mod h1:Qr6/a/Q4r9LP1IltGz7tA7iOK1WonHEYhu1HRBA7ZiM= github.com/nu7hatch/gouuid v0.0.0-20131221200532-179d4d0c4d8d/go.mod h1:YUTz3bUH2ZwIWBy3CJBeOBEugqcmXREj14T+iG/4k4U= github.com/oklog/run v1.0.0 h1:Ru7dDtJNOyC66gQ5dQmaCa0qIsAUFY3sFpK1Xk8igrw= github.com/oklog/run v1.0.0/go.mod h1:dlhp/R75TPv97u0XWUtDeV/lRKWPKSdTuV0TZvrmrQA= github.com/onsi/ginkgo v1.6.0/go.mod h1:lLunBs/Ym6LB5Z9jYTR76FiuTmxDTDusOGeTQH+WWjE= +github.com/onsi/ginkgo v1.7.0 h1:WSHQ+IS43OoUrWtD1/bbclrwK8TTH5hzp+umCiuxHgs= github.com/onsi/ginkgo v1.7.0/go.mod h1:lLunBs/Ym6LB5Z9jYTR76FiuTmxDTDusOGeTQH+WWjE= +github.com/onsi/gomega v1.4.3 h1:RE1xgDvH7imwFD45h+u2SgIfERHlS2yNG4DObb5BSKU= github.com/onsi/gomega v1.4.3/go.mod h1:ex+gbHU/CVuBBDIJjb2X0qEXbFg53c61hWP/1CpauHY= github.com/openzipkin/zipkin-go v0.1.1/go.mod h1:NtoC/o8u3JlF1lSlyPNswIbeQH9bJTmOf0Erfk+hxe8= github.com/packer-community/winrmcp v0.0.0-20180102160824-81144009af58/go.mod h1:f6Izs6JvFTdnRbziASagjZ2vmf55NSIkC/weStxCHqk= @@ -306,10 +302,10 @@ github.com/shurcooL/reactions v0.0.0-20181006231557-f2e0b4ca5b82/go.mod h1:TCR1l github.com/shurcooL/sanitized_anchor_name v0.0.0-20170918181015-86672fcb3f95/go.mod h1:1NzhyTcUVG4SuEtjjoZeVRXNmyL/1OwPU0+IJeTBvfc= github.com/shurcooL/users v0.0.0-20180125191416-49c67e49c537/go.mod h1:QJTqeLYEDaXHZDBsXlPCDqdhQuJkuw4NOtaxYe3xii4= github.com/shurcooL/webdavfs v0.0.0-20170829043945-18c3829fa133/go.mod h1:hKmq5kWdCj2z2KEozexVbfEZIWiTjhE0+UjmZgPqehw= -github.com/sirupsen/logrus v0.0.0-20170317143214-10f801ebc38b/go.mod h1:pMByvHTf9Beacp5x1UXfOR9xyW/9antXMhjMPG0dEzc= github.com/sirupsen/logrus v1.1.1/go.mod h1:zrgwTnHtNr00buQ1vSptGe8m1f/BbgsPukg8qsT7A+A= -github.com/sirupsen/logrus v1.4.1 h1:GL2rEmy6nsikmW0r8opw9JIRScdMF5hA8cOYLH7In1k= github.com/sirupsen/logrus v1.4.1/go.mod h1:ni0Sbl8bgC9z8RoU9G6nDWqqs/fq4eDPysMBDgk/93Q= +github.com/sirupsen/logrus v1.4.2 h1:SPIRibHv4MatM3XXNO2BJeFLZwZ2LvZgfQ5+UNI2im4= +github.com/sirupsen/logrus v1.4.2/go.mod h1:tLMulIdttU9McNUspp0xgXVQah82FyeX6MwdIuYE2rE= github.com/smartystreets/assertions v0.0.0-20180927180507-b2de0cb4f26d/go.mod h1:OnSkiWE9lh6wB0YB77sQom3nweQdgAjqCqsofrRNTgc= github.com/smartystreets/goconvey v0.0.0-20180222194500-ef6db91d284a/go.mod h1:XDJAKZRPZ1CvBcN2aX5YOUTYGHki24fSF0Iv48Ibg0s= github.com/soheilhy/cmux v0.1.4/go.mod h1:IM3LyeVVIOuxMH7sFAkER9+bJ4dT7Ms6E4xg4kGIyLM= @@ -322,8 +318,6 @@ github.com/spf13/afero v1.2.1/go.mod h1:9ZxEEn6pIJ8Rxe320qSDBk6AsU0r9pR7Q4OcevTd github.com/spf13/pflag v1.0.2/go.mod h1:DYY7MBk1bdzusC3SYhjObp+wFpr4gzcvqqNjLnInEg4= github.com/stretchr/objx v0.1.0/go.mod h1:HFkY916IF+rwdDfMAkV7OtwuqBVzrE8GR6GFx+wExME= github.com/stretchr/objx v0.1.1/go.mod h1:HFkY916IF+rwdDfMAkV7OtwuqBVzrE8GR6GFx+wExME= -github.com/stretchr/testify v0.0.0-20170130113145-4d4bfba8f1d1 h1:Zx8Rp9ozC4FPFxfEKRSUu8+Ay3sZxEUZ7JrCWMbGgvE= -github.com/stretchr/testify v0.0.0-20170130113145-4d4bfba8f1d1/go.mod h1:a8OnRcib4nhh0OaRAV+Yts87kKdq0PP7pXfy6kDkUVs= github.com/stretchr/testify v1.2.2/go.mod h1:a8OnRcib4nhh0OaRAV+Yts87kKdq0PP7pXfy6kDkUVs= github.com/stretchr/testify v1.3.0 h1:TivCn/peBQ7UY8ooIcPgZFpTNSz0Q2U6UrFlUfqbe0Q= github.com/stretchr/testify v1.3.0/go.mod h1:M5WIy9Dh21IEIfnGCwXGc5bZfKNJtfHm1UVUgZn+9EI= @@ -338,8 +332,6 @@ github.com/vmihailenco/msgpack v3.3.3+incompatible/go.mod h1:fy3FlTQTDXWkZ7Bh6Ac github.com/vmihailenco/msgpack v4.0.1+incompatible h1:RMF1enSPeKTlXrXdOcqjFUElywVZjjC6pqse21bKbEU= github.com/vmihailenco/msgpack v4.0.1+incompatible/go.mod h1:fy3FlTQTDXWkZ7Bh6AcGMlsjHatGryHQYUTf1ShIgkk= github.com/vmware/govmomi v0.0.0-20170720170038-8ab1a62d9c08/go.mod h1:URlwyTFZX72RmxtxuaFL2Uj3fD1JTvZdx59bHWk6aFU= -github.com/x-cray/logrus-prefixed-formatter v0.3.2 h1:kgW77M6M5sKr3Ux8ypddC11Rpwzr28nfR2GPZq+6EZU= -github.com/x-cray/logrus-prefixed-formatter v0.3.2/go.mod h1:2duySbKsL6M18s5GU7VPsoEPHyzalCE06qoARUCeBBE= github.com/x-cray/logrus-prefixed-formatter v0.5.2 h1:00txxvfBM9muc0jiLIEAkAcIMJzfthRT6usrui8uGmg= github.com/x-cray/logrus-prefixed-formatter v0.5.2/go.mod h1:2duySbKsL6M18s5GU7VPsoEPHyzalCE06qoARUCeBBE= github.com/xanzy/ssh-agent v0.2.1/go.mod h1:mLlQY/MoOhWBj+gOGMQkOeiEvkx+8pJSI+0Bx9h2kr4= @@ -347,8 +339,12 @@ github.com/xiang90/probing v0.0.0-20160813154853-07dd2e8dfe18/go.mod h1:UETIi67q github.com/xlab/treeprint v0.0.0-20161029104018-1d6e34225557/go.mod h1:ce1O1j6UtZfjr22oyGxGLbauSBp2YVXpARAosm7dHBg= github.com/zclconf/go-cty v0.0.0-20181129180422-88fbe721e0f8/go.mod h1:xnAOWiHeOqg2nWS62VtQ7pbOu17FtxJNW8RLEih+O3s= github.com/zclconf/go-cty v0.0.0-20190124225737-a385d646c1e9/go.mod h1:xnAOWiHeOqg2nWS62VtQ7pbOu17FtxJNW8RLEih+O3s= -github.com/zclconf/go-cty v0.0.0-20190320224746-fd76348b9329 h1:ne520NlvoncW5zfBGkmP4EJhyd6ruSaSyhzobv0Vz9w= github.com/zclconf/go-cty v0.0.0-20190320224746-fd76348b9329/go.mod h1:xnAOWiHeOqg2nWS62VtQ7pbOu17FtxJNW8RLEih+O3s= +github.com/zclconf/go-cty v0.0.0-20190426224007-b18a157db9e2/go.mod h1:xnAOWiHeOqg2nWS62VtQ7pbOu17FtxJNW8RLEih+O3s= +github.com/zclconf/go-cty v0.0.0-20190516203816-4fecf87372ec h1:MSeYjmyjucsFbecMTxg63ASg23lcSARP/kr9sClTFfk= +github.com/zclconf/go-cty v0.0.0-20190516203816-4fecf87372ec/go.mod h1:xnAOWiHeOqg2nWS62VtQ7pbOu17FtxJNW8RLEih+O3s= +github.com/zclconf/go-cty-yaml v0.1.0 h1:OP5nkApyAuXB88t8mRUqxD9gbKZocSLuVovrBAt8z10= +github.com/zclconf/go-cty-yaml v0.1.0/go.mod h1:Lk26EcRlO3XbaQ8U2fxIJbEtbgEteSZFUpEr3XFTtsU= go.opencensus.io v0.18.0 h1:Mk5rgZcggtbvtAun5aJzAtjKKN/t0R3jJPlWILlv938= go.opencensus.io v0.18.0/go.mod h1:vKdFvxhtzZ9onBp9VKHK8z/sRpBMnKAsufL7wlDrCOA= go.uber.org/atomic v1.3.2/go.mod h1:gD2HeocX3+yG+ygLZcrzQJaqmWj9AIm7n08wl/qW/PE= @@ -358,13 +354,13 @@ go4.org v0.0.0-20180809161055-417644f6feb5/go.mod h1:MkTOUMDaeVYJUOUsaDXIhWPZYa1 golang.org/x/build v0.0.0-20190111050920-041ab4dc3f9d/go.mod h1:OWs+y06UdEOHN4y+MfF/py+xQ/tYqIWW03b70/CG9Rw= golang.org/x/crypto v0.0.0-20180816225734-aabede6cba87/go.mod h1:6SG95UA2DQfeDnfUPMdvaQW0Q7yPrPDi9nlGo2tz2b4= golang.org/x/crypto v0.0.0-20180904163835-0709b304e793/go.mod h1:6SG95UA2DQfeDnfUPMdvaQW0Q7yPrPDi9nlGo2tz2b4= -golang.org/x/crypto v0.0.0-20181030102418-4d3f4d9ffa16 h1:y6ce7gCWtnH+m3dCjzQ1PCuwl28DDIc3VNnvY29DlIA= golang.org/x/crypto v0.0.0-20181030102418-4d3f4d9ffa16/go.mod h1:6SG95UA2DQfeDnfUPMdvaQW0Q7yPrPDi9nlGo2tz2b4= golang.org/x/crypto v0.0.0-20181112202954-3d3f9f413869/go.mod h1:6SG95UA2DQfeDnfUPMdvaQW0Q7yPrPDi9nlGo2tz2b4= golang.org/x/crypto v0.0.0-20190219172222-a4c6cb3142f2/go.mod h1:6SG95UA2DQfeDnfUPMdvaQW0Q7yPrPDi9nlGo2tz2b4= golang.org/x/crypto v0.0.0-20190222235706-ffb98f73852f/go.mod h1:6SG95UA2DQfeDnfUPMdvaQW0Q7yPrPDi9nlGo2tz2b4= -golang.org/x/crypto v0.0.0-20190308221718-c2843e01d9a2 h1:VklqNMn3ovrHsnt90PveolxSbWFaJdECFbxSq0Mqo2M= golang.org/x/crypto v0.0.0-20190308221718-c2843e01d9a2/go.mod h1:djNgcEr1/C05ACkg1iLfiJU5Ep61QUkGW8qpdssI0+w= +golang.org/x/crypto v0.0.0-20190426145343-a29dc8fdc734 h1:p/H982KKEjUnLJkM3tt/LemDnOc1GiZL5FCVlORJ5zo= +golang.org/x/crypto v0.0.0-20190426145343-a29dc8fdc734/go.mod h1:yigFU9vqHzYiE8UmvKecakEJjdnWj3jj499lnFckfCI= golang.org/x/exp v0.0.0-20190121172915-509febef88a4/go.mod h1:CJ0aWSM057203Lf6IL+f9T1iT9GByDxfZKAQTCR3kQA= golang.org/x/lint v0.0.0-20180702182130-06c8688daad7/go.mod h1:UVdnD1Gm6xHRNCYTkRU2/jEulfH38KcIWyp/GAMgvoE= golang.org/x/lint v0.0.0-20181026193005-c67002cb31c3/go.mod h1:UVdnD1Gm6xHRNCYTkRU2/jEulfH38KcIWyp/GAMgvoE= @@ -374,16 +370,16 @@ golang.org/x/net v0.0.0-20180826012351-8a410e7b638d/go.mod h1:mL1N/T3taQHkDXs73r golang.org/x/net v0.0.0-20180906233101-161cd47e91fd/go.mod h1:mL1N/T3taQHkDXs73rZJwtUhF3w3ftmwwsq0BUmARs4= golang.org/x/net v0.0.0-20181029044818-c44066c5c816/go.mod h1:mL1N/T3taQHkDXs73rZJwtUhF3w3ftmwwsq0BUmARs4= golang.org/x/net v0.0.0-20181106065722-10aee1819953/go.mod h1:mL1N/T3taQHkDXs73rZJwtUhF3w3ftmwwsq0BUmARs4= -golang.org/x/net v0.0.0-20181114220301-adae6a3d119a h1:gOpx8G595UYyvj8UK4+OFyY4rx037g3fmfhe5SasG3U= golang.org/x/net v0.0.0-20181114220301-adae6a3d119a/go.mod h1:mL1N/T3taQHkDXs73rZJwtUhF3w3ftmwwsq0BUmARs4= golang.org/x/net v0.0.0-20181129055619-fae4c4e3ad76/go.mod h1:mL1N/T3taQHkDXs73rZJwtUhF3w3ftmwwsq0BUmARs4= golang.org/x/net v0.0.0-20190108225652-1e06a53dbb7e/go.mod h1:mL1N/T3taQHkDXs73rZJwtUhF3w3ftmwwsq0BUmARs4= golang.org/x/net v0.0.0-20190213061140-3a22650c66bd/go.mod h1:mL1N/T3taQHkDXs73rZJwtUhF3w3ftmwwsq0BUmARs4= -golang.org/x/net v0.0.0-20190311183353-d8887717615a h1:oWX7TPOiFAMXLq8o0ikBYfCJVlRHBcsciT5bXOrH628= golang.org/x/net v0.0.0-20190311183353-d8887717615a/go.mod h1:t9HGtf8HONx5eT2rtn7q6eTqICYqUVnKs3thJo3Qplg= +golang.org/x/net v0.0.0-20190404232315-eb5bcb51f2a3/go.mod h1:t9HGtf8HONx5eT2rtn7q6eTqICYqUVnKs3thJo3Qplg= +golang.org/x/net v0.0.0-20190502183928-7f726cade0ab h1:9RfW3ktsOZxgo9YNbBAjq1FWzc/igwEcUzZz8IXgSbk= +golang.org/x/net v0.0.0-20190502183928-7f726cade0ab/go.mod h1:t9HGtf8HONx5eT2rtn7q6eTqICYqUVnKs3thJo3Qplg= golang.org/x/oauth2 v0.0.0-20180821212333-d2e6202438be/go.mod h1:N/0e6XlmueqKjAGxoOufVs8QHGRruUQn6yWY3a++T0U= golang.org/x/oauth2 v0.0.0-20181017192945-9dcd33a902f4/go.mod h1:N/0e6XlmueqKjAGxoOufVs8QHGRruUQn6yWY3a++T0U= -golang.org/x/oauth2 v0.0.0-20181203162652-d668ce993890 h1:uESlIz09WIHT2I+pasSXcpLYqYK8wHcdCetU3VuMBJE= golang.org/x/oauth2 v0.0.0-20181203162652-d668ce993890/go.mod h1:N/0e6XlmueqKjAGxoOufVs8QHGRruUQn6yWY3a++T0U= golang.org/x/oauth2 v0.0.0-20190220154721-9b3c75971fc9 h1:pfyU+l9dEu0vZzDDMsdAKa1gZbJYEn6urYXj/+Xkz7s= golang.org/x/oauth2 v0.0.0-20190220154721-9b3c75971fc9/go.mod h1:gOpvHmFTYa4IltrdGE7lF6nIHvwfUNPOp7c8zoXwtLw= @@ -391,27 +387,32 @@ golang.org/x/perf v0.0.0-20180704124530-6e6d33e29852/go.mod h1:JLpeXjPJfIyPr5Tlb golang.org/x/sync v0.0.0-20180314180146-1d60e4601c6f/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM= golang.org/x/sync v0.0.0-20181108010431-42b317875d0f/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM= golang.org/x/sync v0.0.0-20181221193216-37e7f081c4d4/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM= -golang.org/x/sys v0.0.0-20170329061634-9a7256cb28ed/go.mod h1:STP8DvDyc/dI5b8T5hshtkjS+E42TnysNCUPdjciGhY= +golang.org/x/sync v0.0.0-20190423024810-112230192c58/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM= golang.org/x/sys v0.0.0-20180823144017-11551d06cbcc/go.mod h1:STP8DvDyc/dI5b8T5hshtkjS+E42TnysNCUPdjciGhY= golang.org/x/sys v0.0.0-20180830151530-49385e6e1522/go.mod h1:STP8DvDyc/dI5b8T5hshtkjS+E42TnysNCUPdjciGhY= golang.org/x/sys v0.0.0-20180905080454-ebe1bf3edb33/go.mod h1:STP8DvDyc/dI5b8T5hshtkjS+E42TnysNCUPdjciGhY= golang.org/x/sys v0.0.0-20180909124046-d0be0721c37e/go.mod h1:STP8DvDyc/dI5b8T5hshtkjS+E42TnysNCUPdjciGhY= golang.org/x/sys v0.0.0-20181029174526-d69651ed3497/go.mod h1:STP8DvDyc/dI5b8T5hshtkjS+E42TnysNCUPdjciGhY= golang.org/x/sys v0.0.0-20181213200352-4d1cda033e06/go.mod h1:STP8DvDyc/dI5b8T5hshtkjS+E42TnysNCUPdjciGhY= -golang.org/x/sys v0.0.0-20190129075346-302c3dd5f1cc h1:WiYx1rIFmx8c0mXAFtv5D/mHyKe1+jmuP7PViuwqwuQ= golang.org/x/sys v0.0.0-20190129075346-302c3dd5f1cc/go.mod h1:STP8DvDyc/dI5b8T5hshtkjS+E42TnysNCUPdjciGhY= golang.org/x/sys v0.0.0-20190215142949-d0b11bdaac8a/go.mod h1:STP8DvDyc/dI5b8T5hshtkjS+E42TnysNCUPdjciGhY= golang.org/x/sys v0.0.0-20190221075227-b4e8571b14e0/go.mod h1:STP8DvDyc/dI5b8T5hshtkjS+E42TnysNCUPdjciGhY= -golang.org/x/sys v0.0.0-20190222072716-a9d3bda3a223 h1:DH4skfRX4EBpamg7iV4ZlCpblAHI6s6TDM39bFZumv8= golang.org/x/sys v0.0.0-20190222072716-a9d3bda3a223/go.mod h1:STP8DvDyc/dI5b8T5hshtkjS+E42TnysNCUPdjciGhY= +golang.org/x/sys v0.0.0-20190412213103-97732733099d/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= +golang.org/x/sys v0.0.0-20190422165155-953cdadca894/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= +golang.org/x/sys v0.0.0-20190502175342-a43fa875dd82 h1:vsphBvatvfbhlb4PO1BYSr9dzugGxJ/SQHoNufZJq1w= +golang.org/x/sys v0.0.0-20190502175342-a43fa875dd82/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= golang.org/x/text v0.3.0/go.mod h1:NqM8EUOU14njkJ3fqMW+pc6Ldnwhi/IjpwHt7yyuwOQ= -golang.org/x/text v0.3.1-0.20180807135948-17ff2d5776d2 h1:z99zHgr7hKfrUcX/KsoJk5FJfjTceCKIp96+biqP4To= golang.org/x/text v0.3.1-0.20180807135948-17ff2d5776d2/go.mod h1:NqM8EUOU14njkJ3fqMW+pc6Ldnwhi/IjpwHt7yyuwOQ= +golang.org/x/text v0.3.2 h1:tW2bmiBqwgJj/UpqtC8EpXEZVYOwU0yG4iWbprSVAcs= +golang.org/x/text v0.3.2/go.mod h1:bEr9sfX3Q8Zfm5fL9x+3itogRgK3+ptLWKqgva+5dAk= golang.org/x/time v0.0.0-20180412165947-fbb02b2291d2/go.mod h1:tRJNPiyCQ0inRvYxbN9jk5I+vvW/OXSQhTDSoE431IQ= golang.org/x/time v0.0.0-20181108054448-85acf8d2951c/go.mod h1:tRJNPiyCQ0inRvYxbN9jk5I+vvW/OXSQhTDSoE431IQ= golang.org/x/time v0.0.0-20190308202827-9d24e82272b4/go.mod h1:tRJNPiyCQ0inRvYxbN9jk5I+vvW/OXSQhTDSoE431IQ= golang.org/x/tools v0.0.0-20180828015842-6cd1fcedba52/go.mod h1:n7NCudcB/nEzxVGmLbDWY5pfWTLqBcC2KZ6jyYvM4mQ= +golang.org/x/tools v0.0.0-20180917221912-90fa682c2a6e/go.mod h1:n7NCudcB/nEzxVGmLbDWY5pfWTLqBcC2KZ6jyYvM4mQ= golang.org/x/tools v0.0.0-20181030000716-a0a13e073c7b/go.mod h1:n7NCudcB/nEzxVGmLbDWY5pfWTLqBcC2KZ6jyYvM4mQ= +golang.org/x/tools v0.0.0-20190425150028-36563e24a262/go.mod h1:RgjU9mgBXZiqYHBnxXauZ1Gv1EHHAz9KjViQ78xBX0Q= google.golang.org/api v0.0.0-20180910000450-7ca32eb868bf/go.mod h1:4mhQ8q/RsB7i+udVvVy5NUi08OU8ZlA0gRVgrF7VFY0= google.golang.org/api v0.0.0-20181030000543-1d582fd0359e/go.mod h1:4mhQ8q/RsB7i+udVvVy5NUi08OU8ZlA0gRVgrF7VFY0= google.golang.org/api v0.1.0 h1:K6z2u68e86TPdSdefXdzvXgR1zEMa+459vBSfWYAZkI= @@ -426,23 +427,26 @@ google.golang.org/genproto v0.0.0-20181029155118-b69ba1387ce2/go.mod h1:JiN7NxoA google.golang.org/genproto v0.0.0-20181202183823-bd91e49a0898/go.mod h1:7Ep/1NZk928CDR8SjdVbjWNpdIf6nzjE3BTgJDr2Atg= google.golang.org/genproto v0.0.0-20190201180003-4b09977fb922 h1:mBVYJnbrXLA/ZCBTCe7PtEgAUP+1bg92qTaFoPHdz+8= google.golang.org/genproto v0.0.0-20190201180003-4b09977fb922/go.mod h1:L3J43x8/uS+qIUoksaLKe6OS3nUKxOKuIFz1sl2/jx4= -google.golang.org/grpc v0.0.0-20171228173116-65c901e45820/go.mod h1:yo6s7OP7yaDglbqo1J04qKzAhqBH6lvTonzMVmEdcZw= google.golang.org/grpc v1.14.0/go.mod h1:yo6s7OP7yaDglbqo1J04qKzAhqBH6lvTonzMVmEdcZw= google.golang.org/grpc v1.16.0/go.mod h1:0JHn/cJsOMiMfNA9+DeHDlAU7KAAB5GDlYFpa9MZMio= -google.golang.org/grpc v1.17.0 h1:TRJYBgMclJvGYn2rIMjj+h9KtMt5r1Ij7ODVRIZkwhk= google.golang.org/grpc v1.17.0/go.mod h1:6QZJwpn2B+Zp71q/5VxRsJ6NXXVCE5NRUHRo+f3cWCs= google.golang.org/grpc v1.18.0 h1:IZl7mfBGfbhYx2p2rKRtYgDFw6SBz+kclmxYrCksPPA= google.golang.org/grpc v1.18.0/go.mod h1:6QZJwpn2B+Zp71q/5VxRsJ6NXXVCE5NRUHRo+f3cWCs= gopkg.in/check.v1 v0.0.0-20161208181325-20d25e280405/go.mod h1:Co6ibVJAznAaIkqp8huTwlJQCZ016jof/cbN4VW5Yz0= gopkg.in/check.v1 v1.0.0-20180628173108-788fd7840127/go.mod h1:Co6ibVJAznAaIkqp8huTwlJQCZ016jof/cbN4VW5Yz0= gopkg.in/cheggaaa/pb.v1 v1.0.27/go.mod h1:V/YB90LKu/1FcN3WVnfiiE5oMCibMjukxqG/qStrOgw= +gopkg.in/fsnotify.v1 v1.4.7 h1:xOHLXZwVvI9hhs+cLKq5+I5onOuwQLhQwiu63xxlHs4= gopkg.in/fsnotify.v1 v1.4.7/go.mod h1:Tz8NjZHkW78fSQdbUxIjBTcgA1z1m8ZHf0WmKUhAMys= -gopkg.in/h2non/gock.v1 v1.0.4 h1:bgiDQT2x2+4VVNWxEwPtiYSpCPrDl+n3vVmGsOCmIfg= gopkg.in/h2non/gock.v1 v1.0.4/go.mod h1:KHI4Z1sxDW6P4N3DfTWSEza07YpkQP7KJBfglRMEjKY= +gopkg.in/h2non/gock.v1 v1.0.15 h1:SzLqcIlb/fDfg7UvukMpNcWsu7sI5tWwL+KCATZqks0= +gopkg.in/h2non/gock.v1 v1.0.15/go.mod h1:sX4zAkdYX1TRGJ2JY156cFspQn4yRWn6p9EMdODlynE= gopkg.in/inf.v0 v0.9.1/go.mod h1:cWUDdTG/fYaXco+Dcufb5Vnc6Gp2YChqWtbxRZE0mXw= +gopkg.in/ini.v1 v1.42.0/go.mod h1:pNLf8WUiyNEtQjuu5G5vTm06TEv9tsIgeAvK8hOrP4k= +gopkg.in/tomb.v1 v1.0.0-20141024135613-dd632973f1e7 h1:uRGJdciOHaEIrze2W8Q3AKkepLTh2hOroT7a+7czfdQ= gopkg.in/tomb.v1 v1.0.0-20141024135613-dd632973f1e7/go.mod h1:dt/ZhP58zS4L8KSrWDmTeBkI65Dw0HsyUHuEVlX15mw= gopkg.in/vmihailenco/msgpack.v2 v2.9.1/go.mod h1:/3Dn1Npt9+MYyLpYYXjInO/5jvMLamn+AEGwNEOatn8= gopkg.in/yaml.v2 v2.2.1/go.mod h1:hI93XBmqTisBFMUTm0b8Fm+jr3Dg1NNxqwp+5A1VGuI= +gopkg.in/yaml.v2 v2.2.2 h1:ZCJp+EgiOT7lHqUV2J862kp8Qj64Jo6az82+3Td9dZw= gopkg.in/yaml.v2 v2.2.2/go.mod h1:hI93XBmqTisBFMUTm0b8Fm+jr3Dg1NNxqwp+5A1VGuI= grpc.go4.org v0.0.0-20170609214715-11d0a25b4919/go.mod h1:77eQGdRu53HpSqPFJFmuJdjuHRquDANNeA4x7B8WQ9o= honnef.co/go/tools v0.0.0-20180728063816-88497007e858/go.mod h1:rf3lG4BRIbNafJWhAfAdb/ePZxsR/4RtNHQocxwk9r4= diff --git a/solidfire/data_source_solidfire_volume_test.go b/solidfire/data_source_solidfire_volume_test.go index 1b06d52..11d2816 100644 --- a/solidfire/data_source_solidfire_volume_test.go +++ b/solidfire/data_source_solidfire_volume_test.go @@ -29,21 +29,21 @@ func TestAccDataSourceVolume_basic(t *testing.T) { Check: resource.ComposeTestCheckFunc( testAccCheckSolidFireVolumeExists("solidfire_volume.terraform-acceptance-test-1", &volume), testAccCheckSolidFireVolumeAttributes(&volume), - resource.TestCheckResourceAttrPair("solidfire_volume.terraform-acceptance-test-1", "name", "data.solidfire_volume","name"), - resource.TestCheckResourceAttrPair("solidfire_volume.terraform-acceptance-test-1", "total_size", "data.solidfire_volume","total_size"), - resource.TestCheckResourceAttrPair("solidfire_volume.terraform-acceptance-test-1", "enable512e", "data.solidfire_volume","enable512e"), - resource.TestCheckResourceAttrPair("solidfire_volume.terraform-acceptance-test-1", "min_iops", "data.solidfire_volume","min_iops"), - resource.TestCheckResourceAttrPair("solidfire_volume.terraform-acceptance-test-1", "max_iops", "data.solidfire_volume","max_iops"), - resource.TestCheckResourceAttrPair("solidfire_volume.terraform-acceptance-test-1", "burst_iops", "data.solidfire_volume","burst_iops"), - resource.TestCheckResourceAttrPair("solidfire_volume.terraform-acceptance-test-1", "access", "data.solidfire_volume","access"), - resource.TestCheckResourceAttrPair("solidfire_volume.terraform-acceptance-test-1", "status", "data.solidfire_volume","status"), - resource.TestCheckResourceAttrPair("solidfire_volume.terraform-acceptance-test-1", "purge_on_delete", "data.solidfire_volume","purge_on_delete"), - resource.TestCheckResourceAttrPair("solidfire_volume.terraform-acceptance-test-1", "attributes", "data.solidfire_volume","attributes"), - resource.TestCheckResourceAttrPair("solidfire_volume.terraform-acceptance-test-1", "volume_id", "data.solidfire_volume","volume_id"), - resource.TestCheckResourceAttrPair("solidfire_volume.terraform-acceptance-test-1", "iqn", "data.solidfire_volume","iqn"), - resource.TestCheckResourceAttrPair("solidfire_volume.terraform-acceptance-test-1", "block_size", "data.solidfire_volume","block_size"), - resource.TestCheckResourceAttrPair("solidfire_volume.terraform-acceptance-test-1", "scsi_eui_device_id", "data.solidfire_volume","scsi_eui_device_id"), - resource.TestCheckResourceAttrPair("solidfire_volume.terraform-acceptance-test-1", "scsi_naa_device_id", "data.solidfire_volume","scsi_naa_device_id"), + resource.TestCheckResourceAttrPair("solidfire_volume.terraform-acceptance-test-1", "name", "data.solidfire_volume", "name"), + resource.TestCheckResourceAttrPair("solidfire_volume.terraform-acceptance-test-1", "total_size", "data.solidfire_volume", "total_size"), + resource.TestCheckResourceAttrPair("solidfire_volume.terraform-acceptance-test-1", "enable512e", "data.solidfire_volume", "enable512e"), + resource.TestCheckResourceAttrPair("solidfire_volume.terraform-acceptance-test-1", "min_iops", "data.solidfire_volume", "min_iops"), + resource.TestCheckResourceAttrPair("solidfire_volume.terraform-acceptance-test-1", "max_iops", "data.solidfire_volume", "max_iops"), + resource.TestCheckResourceAttrPair("solidfire_volume.terraform-acceptance-test-1", "burst_iops", "data.solidfire_volume", "burst_iops"), + resource.TestCheckResourceAttrPair("solidfire_volume.terraform-acceptance-test-1", "access", "data.solidfire_volume", "access"), + resource.TestCheckResourceAttrPair("solidfire_volume.terraform-acceptance-test-1", "status", "data.solidfire_volume", "status"), + resource.TestCheckResourceAttrPair("solidfire_volume.terraform-acceptance-test-1", "purge_on_delete", "data.solidfire_volume", "purge_on_delete"), + resource.TestCheckResourceAttrPair("solidfire_volume.terraform-acceptance-test-1", "attributes", "data.solidfire_volume", "attributes"), + resource.TestCheckResourceAttrPair("solidfire_volume.terraform-acceptance-test-1", "volume_id", "data.solidfire_volume", "volume_id"), + resource.TestCheckResourceAttrPair("solidfire_volume.terraform-acceptance-test-1", "iqn", "data.solidfire_volume", "iqn"), + resource.TestCheckResourceAttrPair("solidfire_volume.terraform-acceptance-test-1", "block_size", "data.solidfire_volume", "block_size"), + resource.TestCheckResourceAttrPair("solidfire_volume.terraform-acceptance-test-1", "scsi_eui_device_id", "data.solidfire_volume", "scsi_eui_device_id"), + resource.TestCheckResourceAttrPair("solidfire_volume.terraform-acceptance-test-1", "scsi_naa_device_id", "data.solidfire_volume", "scsi_naa_device_id"), ), }, }, @@ -72,21 +72,21 @@ func TestAccDataSourceVolume_update(t *testing.T) { Check: resource.ComposeTestCheckFunc( testAccCheckSolidFireVolumeExists("solidfire_volume.terraform-acceptance-test-1", &volume), testAccCheckSolidFireVolumeAttributes(&volume), - resource.TestCheckResourceAttrPair("solidfire_volume.terraform-acceptance-test-1", "name", "data.solidfire_volume","name"), - resource.TestCheckResourceAttrPair("solidfire_volume.terraform-acceptance-test-1", "total_size", "data.solidfire_volume","total_size"), - resource.TestCheckResourceAttrPair("solidfire_volume.terraform-acceptance-test-1", "enable512e", "data.solidfire_volume","enable512e"), - resource.TestCheckResourceAttrPair("solidfire_volume.terraform-acceptance-test-1", "min_iops", "data.solidfire_volume","min_iops"), - resource.TestCheckResourceAttrPair("solidfire_volume.terraform-acceptance-test-1", "max_iops", "data.solidfire_volume","max_iops"), - resource.TestCheckResourceAttrPair("solidfire_volume.terraform-acceptance-test-1", "burst_iops", "data.solidfire_volume","burst_iops"), - resource.TestCheckResourceAttrPair("solidfire_volume.terraform-acceptance-test-1", "access", "data.solidfire_volume","access"), - resource.TestCheckResourceAttrPair("solidfire_volume.terraform-acceptance-test-1", "status", "data.solidfire_volume","status"), - resource.TestCheckResourceAttrPair("solidfire_volume.terraform-acceptance-test-1", "purge_on_delete", "data.solidfire_volume","purge_on_delete"), - resource.TestCheckResourceAttrPair("solidfire_volume.terraform-acceptance-test-1", "attributes", "data.solidfire_volume","attributes"), - resource.TestCheckResourceAttrPair("solidfire_volume.terraform-acceptance-test-1", "volume_id", "data.solidfire_volume","volume_id"), - resource.TestCheckResourceAttrPair("solidfire_volume.terraform-acceptance-test-1", "iqn", "data.solidfire_volume","iqn"), - resource.TestCheckResourceAttrPair("solidfire_volume.terraform-acceptance-test-1", "block_size", "data.solidfire_volume","block_size"), - resource.TestCheckResourceAttrPair("solidfire_volume.terraform-acceptance-test-1", "scsi_eui_device_id", "data.solidfire_volume","scsi_eui_device_id"), - resource.TestCheckResourceAttrPair("solidfire_volume.terraform-acceptance-test-1", "scsi_naa_device_id", "data.solidfire_volume","scsi_naa_device_id"), + resource.TestCheckResourceAttrPair("solidfire_volume.terraform-acceptance-test-1", "name", "data.solidfire_volume", "name"), + resource.TestCheckResourceAttrPair("solidfire_volume.terraform-acceptance-test-1", "total_size", "data.solidfire_volume", "total_size"), + resource.TestCheckResourceAttrPair("solidfire_volume.terraform-acceptance-test-1", "enable512e", "data.solidfire_volume", "enable512e"), + resource.TestCheckResourceAttrPair("solidfire_volume.terraform-acceptance-test-1", "min_iops", "data.solidfire_volume", "min_iops"), + resource.TestCheckResourceAttrPair("solidfire_volume.terraform-acceptance-test-1", "max_iops", "data.solidfire_volume", "max_iops"), + resource.TestCheckResourceAttrPair("solidfire_volume.terraform-acceptance-test-1", "burst_iops", "data.solidfire_volume", "burst_iops"), + resource.TestCheckResourceAttrPair("solidfire_volume.terraform-acceptance-test-1", "access", "data.solidfire_volume", "access"), + resource.TestCheckResourceAttrPair("solidfire_volume.terraform-acceptance-test-1", "status", "data.solidfire_volume", "status"), + resource.TestCheckResourceAttrPair("solidfire_volume.terraform-acceptance-test-1", "purge_on_delete", "data.solidfire_volume", "purge_on_delete"), + resource.TestCheckResourceAttrPair("solidfire_volume.terraform-acceptance-test-1", "attributes", "data.solidfire_volume", "attributes"), + resource.TestCheckResourceAttrPair("solidfire_volume.terraform-acceptance-test-1", "volume_id", "data.solidfire_volume", "volume_id"), + resource.TestCheckResourceAttrPair("solidfire_volume.terraform-acceptance-test-1", "iqn", "data.solidfire_volume", "iqn"), + resource.TestCheckResourceAttrPair("solidfire_volume.terraform-acceptance-test-1", "block_size", "data.solidfire_volume", "block_size"), + resource.TestCheckResourceAttrPair("solidfire_volume.terraform-acceptance-test-1", "scsi_eui_device_id", "data.solidfire_volume", "scsi_eui_device_id"), + resource.TestCheckResourceAttrPair("solidfire_volume.terraform-acceptance-test-1", "scsi_naa_device_id", "data.solidfire_volume", "scsi_naa_device_id"), ), }, { @@ -100,34 +100,31 @@ func TestAccDataSourceVolume_update(t *testing.T) { "9600", "true", "terraform-acceptance-test", - ), Check: resource.ComposeTestCheckFunc( testAccCheckSolidFireVolumeExists("solidfire_volume.terraform-acceptance-test-1", &volume), testAccCheckSolidFireVolumeAttributesUpdate(&volume), - resource.TestCheckResourceAttrPair("solidfire_volume.terraform-acceptance-test-1", "name", "data.solidfire_volume","name"), - resource.TestCheckResourceAttrPair("solidfire_volume.terraform-acceptance-test-1", "total_size", "data.solidfire_volume","total_size"), - resource.TestCheckResourceAttrPair("solidfire_volume.terraform-acceptance-test-1", "enable512e", "data.solidfire_volume","enable512e"), - resource.TestCheckResourceAttrPair("solidfire_volume.terraform-acceptance-test-1", "min_iops", "data.solidfire_volume","min_iops"), - resource.TestCheckResourceAttrPair("solidfire_volume.terraform-acceptance-test-1", "max_iops", "data.solidfire_volume","max_iops"), - resource.TestCheckResourceAttrPair("solidfire_volume.terraform-acceptance-test-1", "burst_iops", "data.solidfire_volume","burst_iops"), - resource.TestCheckResourceAttrPair("solidfire_volume.terraform-acceptance-test-1", "access", "data.solidfire_volume","access"), - resource.TestCheckResourceAttrPair("solidfire_volume.terraform-acceptance-test-1", "status", "data.solidfire_volume","status"), - resource.TestCheckResourceAttrPair("solidfire_volume.terraform-acceptance-test-1", "purge_on_delete", "data.solidfire_volume","purge_on_delete"), - resource.TestCheckResourceAttrPair("solidfire_volume.terraform-acceptance-test-1", "attributes", "data.solidfire_volume","attributes"), - resource.TestCheckResourceAttrPair("solidfire_volume.terraform-acceptance-test-1", "volume_id", "data.solidfire_volume","volume_id"), - resource.TestCheckResourceAttrPair("solidfire_volume.terraform-acceptance-test-1", "iqn", "data.solidfire_volume","iqn"), - resource.TestCheckResourceAttrPair("solidfire_volume.terraform-acceptance-test-1", "block_size", "data.solidfire_volume","block_size"), - resource.TestCheckResourceAttrPair("solidfire_volume.terraform-acceptance-test-1", "scsi_eui_device_id", "data.solidfire_volume","scsi_eui_device_id"), - resource.TestCheckResourceAttrPair("solidfire_volume.terraform-acceptance-test-1", "scsi_naa_device_id", "data.solidfire_volume","scsi_naa_device_id"), + resource.TestCheckResourceAttrPair("solidfire_volume.terraform-acceptance-test-1", "name", "data.solidfire_volume", "name"), + resource.TestCheckResourceAttrPair("solidfire_volume.terraform-acceptance-test-1", "total_size", "data.solidfire_volume", "total_size"), + resource.TestCheckResourceAttrPair("solidfire_volume.terraform-acceptance-test-1", "enable512e", "data.solidfire_volume", "enable512e"), + resource.TestCheckResourceAttrPair("solidfire_volume.terraform-acceptance-test-1", "min_iops", "data.solidfire_volume", "min_iops"), + resource.TestCheckResourceAttrPair("solidfire_volume.terraform-acceptance-test-1", "max_iops", "data.solidfire_volume", "max_iops"), + resource.TestCheckResourceAttrPair("solidfire_volume.terraform-acceptance-test-1", "burst_iops", "data.solidfire_volume", "burst_iops"), + resource.TestCheckResourceAttrPair("solidfire_volume.terraform-acceptance-test-1", "access", "data.solidfire_volume", "access"), + resource.TestCheckResourceAttrPair("solidfire_volume.terraform-acceptance-test-1", "status", "data.solidfire_volume", "status"), + resource.TestCheckResourceAttrPair("solidfire_volume.terraform-acceptance-test-1", "purge_on_delete", "data.solidfire_volume", "purge_on_delete"), + resource.TestCheckResourceAttrPair("solidfire_volume.terraform-acceptance-test-1", "attributes", "data.solidfire_volume", "attributes"), + resource.TestCheckResourceAttrPair("solidfire_volume.terraform-acceptance-test-1", "volume_id", "data.solidfire_volume", "volume_id"), + resource.TestCheckResourceAttrPair("solidfire_volume.terraform-acceptance-test-1", "iqn", "data.solidfire_volume", "iqn"), + resource.TestCheckResourceAttrPair("solidfire_volume.terraform-acceptance-test-1", "block_size", "data.solidfire_volume", "block_size"), + resource.TestCheckResourceAttrPair("solidfire_volume.terraform-acceptance-test-1", "scsi_eui_device_id", "data.solidfire_volume", "scsi_eui_device_id"), + resource.TestCheckResourceAttrPair("solidfire_volume.terraform-acceptance-test-1", "scsi_naa_device_id", "data.solidfire_volume", "scsi_naa_device_id"), ), }, }, }) } - - const testAccCheckDataSourceSolidFireVolumeConfig = ` resource "solidfire_volume" "terraform-acceptance-test-1" { name = "%s" @@ -175,4 +172,4 @@ data "solidfire_volume" "terraform-acceptance-test-1" { resource "solidfire_account" "terraform-acceptance-test-1" { username = "terraform-acceptance-test-volume" } -` \ No newline at end of file +` diff --git a/solidfire/element/volume.go b/solidfire/element/volume.go index ba7c917..ab85b75 100644 --- a/solidfire/element/volume.go +++ b/solidfire/element/volume.go @@ -95,6 +95,14 @@ func (c *Client) GetVolumeByID(id string) (Volume, error) { } +/*func (c *Client) GetVolumeByName(id string) (Volume, error) { + + volumes := ListVolumes(structs.Map(ListVolumesRequest{Volumes: volIDs})) + for + +} +*/ + func (c *Client) getVolumes(params map[string]interface{}) ([]Volume, error) { response, err := c.CallAPIMethod("ListVolumes", params) if err != nil { diff --git a/solidfire/resource_solidfire_volume_test.go b/solidfire/resource_solidfire_volume_test.go index 7c1ca93..d473068 100644 --- a/solidfire/resource_solidfire_volume_test.go +++ b/solidfire/resource_solidfire_volume_test.go @@ -117,7 +117,6 @@ func TestAccResourceVolume_update(t *testing.T) { }) } - // Compare the actual attributes as present on the SolidFire cluster via the SolidFire API // to check there's no difference between the reality and TF's state func testAccCheckSolidFireVolumeAttributes(volume *element.Volume) resource.TestCheckFunc { diff --git a/solidfire/volume_test.go b/solidfire/volume_test.go index f24aa46..df66dd1 100644 --- a/solidfire/volume_test.go +++ b/solidfire/volume_test.go @@ -87,5 +87,3 @@ func testAccCheckSolidFireVolumeExists(n string, volume *element.Volume) resourc return nil } } - -