Skip to content

Commit

Permalink
Updates
Browse files Browse the repository at this point in the history
  • Loading branch information
Dylan-Christopherson committed Jan 9, 2025
1 parent c7a4686 commit 107c3df
Show file tree
Hide file tree
Showing 3 changed files with 13 additions and 39 deletions.
6 changes: 1 addition & 5 deletions examples/ibm-sdsaas/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -79,11 +79,7 @@ resource "ibm_sds_host" "sds_host_instance" {

## Assumptions

1. TODO

## Notes

1. TODO
The `IBMCLOUD_SDS_ENDPOINT` is required to be set by the user before running the terraform commands. This is the endpoint provided to customers to perform operations against their service.

## Requirements

Expand Down
21 changes: 8 additions & 13 deletions ibm/conns/config.go
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,6 @@ import (
"encoding/json"
"errors"
"fmt"
"github.com/IBM/cloud-db2-go-sdk/db2saasv1"
"io"
"io/ioutil"
"log"
Expand All @@ -18,6 +17,8 @@ import (
"strings"
"time"

"github.com/IBM/cloud-db2-go-sdk/db2saasv1"

// Added code for the Power Colo Offering

"github.com/IBM-Cloud/container-services-go-sdk/kubernetesserviceapiv1"
Expand Down Expand Up @@ -679,15 +680,13 @@ type clientSession struct {
ibmCloudLogsRoutingClient *ibmcloudlogsroutingv0.IBMCloudLogsRoutingV0
ibmCloudLogsRoutingClientErr error

<<<<<<< HEAD
// db2 saas
db2saasClient *db2saasv1.Db2saasV1
db2saasClientErr error
=======

// Software Defined Storage
sdsaasClient *sdsaasv1.SdsaasV1
sdsaasClientErr error
>>>>>>> f12d12b17 (Add SDSaaS to terraform provider)
}

// Usage Reports
Expand Down Expand Up @@ -1292,16 +1291,7 @@ func (session clientSession) ProjectV1() (*project.ProjectV1, error) {
return session.projectClient, session.projectClientErr
}

<<<<<<< HEAD
// MQaaS
=======
// sdsaas
func (session clientSession) SdsaasV1() (*sdsaasv1.SdsaasV1, error) {
return session.sdsaasClient, session.sdsaasClientErr
}

// MQ on Cloud
>>>>>>> f12d12b17 (Add SDSaaS to terraform provider)
func (session clientSession) MqcloudV1() (*mqcloudv1.MqcloudV1, error) {
if session.mqcloudClientErr != nil {
sessionMqcloudClient := session.mqcloudClient
Expand All @@ -1311,6 +1301,11 @@ func (session clientSession) MqcloudV1() (*mqcloudv1.MqcloudV1, error) {
return session.mqcloudClient.Clone(), nil
}

// sdsaas
func (session clientSession) SdsaasV1() (*sdsaasv1.SdsaasV1, error) {
return session.sdsaasClient, session.sdsaasClientErr
}

// VMware as a Service API
func (session clientSession) VmwareV1() (*vmwarev1.VmwareV1, error) {
return session.vmwareClient, session.vmwareClientErr
Expand Down
25 changes: 4 additions & 21 deletions ibm/service/sdsaas/resource_ibm_sds_volume_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,6 @@ func TestAccIBMSdsVolumeBasic(t *testing.T) {
var conf sdsaasv1.Volume
capacity := fmt.Sprintf("%d", acctest.RandIntRange(1, 5))
name := "terraform-test-1"
capacityUpdate := fmt.Sprintf("%d", acctest.RandIntRange(6, 10))
nameUpdate := "terraform-test-name-updated"

resource.Test(t, resource.TestCase{
Expand All @@ -41,16 +40,9 @@ func TestAccIBMSdsVolumeBasic(t *testing.T) {
),
},
resource.TestStep{
Config: testAccCheckIBMSdsVolumeConfigBasic(capacityUpdate, name),
Config: testAccCheckIBMSdsVolumeConfigBasic(capacity, nameUpdate),
Check: resource.ComposeAggregateTestCheckFunc(
resource.TestCheckResourceAttr("ibm_sds_volume.sds_volume_instance", "capacity", capacityUpdate),
resource.TestCheckResourceAttr("ibm_sds_volume.sds_volume_instance", "name", name),
),
},
resource.TestStep{
Config: testAccCheckIBMSdsVolumeConfigBasic(capacityUpdate, nameUpdate),
Check: resource.ComposeAggregateTestCheckFunc(
resource.TestCheckResourceAttr("ibm_sds_volume.sds_volume_instance", "capacity", capacityUpdate),
resource.TestCheckResourceAttr("ibm_sds_volume.sds_volume_instance", "capacity", capacity),
resource.TestCheckResourceAttr("ibm_sds_volume.sds_volume_instance", "name", nameUpdate),
),
},
Expand All @@ -63,7 +55,6 @@ func TestAccIBMSdsVolumeAllArgs(t *testing.T) {
hostnqnstring := "nqn.2014-06.org:9345"
capacity := fmt.Sprintf("%d", acctest.RandIntRange(1, 5))
name := "terraform-test-name-1"
capacityUpdate := fmt.Sprintf("%d", acctest.RandIntRange(6, 10))
nameUpdate := "terraform-test-name-updated"

resource.Test(t, resource.TestCase{
Expand All @@ -81,18 +72,10 @@ func TestAccIBMSdsVolumeAllArgs(t *testing.T) {
),
},
resource.TestStep{
Config: testAccCheckIBMSdsVolumeConfig(hostnqnstring, capacityUpdate, name),
Config: testAccCheckIBMSdsVolumeConfig(hostnqnstring, capacity, nameUpdate),
Check: resource.ComposeAggregateTestCheckFunc(
resource.TestCheckResourceAttr("ibm_sds_volume.sds_volume_instance", "hostnqnstring", hostnqnstring),
resource.TestCheckResourceAttr("ibm_sds_volume.sds_volume_instance", "capacity", capacityUpdate),
resource.TestCheckResourceAttr("ibm_sds_volume.sds_volume_instance", "name", name),
),
},
resource.TestStep{
Config: testAccCheckIBMSdsVolumeConfig(hostnqnstring, capacityUpdate, nameUpdate),
Check: resource.ComposeAggregateTestCheckFunc(
resource.TestCheckResourceAttr("ibm_sds_volume.sds_volume_instance", "hostnqnstring", hostnqnstring),
resource.TestCheckResourceAttr("ibm_sds_volume.sds_volume_instance", "capacity", capacityUpdate),
resource.TestCheckResourceAttr("ibm_sds_volume.sds_volume_instance", "capacity", capacity),
resource.TestCheckResourceAttr("ibm_sds_volume.sds_volume_instance", "name", nameUpdate),
),
},
Expand Down

0 comments on commit 107c3df

Please sign in to comment.