Skip to content

Commit

Permalink
[ignore] Update CHANGELOG.md for v2.3.0 release
Browse files Browse the repository at this point in the history
  • Loading branch information
lhercot committed Jun 12, 2022
1 parent 59bab57 commit b0c80ab
Show file tree
Hide file tree
Showing 2 changed files with 51 additions and 37 deletions.
13 changes: 13 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,3 +1,16 @@
## 2.3.0 (June 11, 2022)
IMPROVEMENTS:
Add datasource aci_l4_l7_deployed_graph_connector_vlan
Add resource and datasource for aci_ip_sla_monitoring_policy (#881)
Add resources and datasources aci_contract_subject_filter and aci_contract_subject_one_way_filter and support for one-way contracts in aci_contract_subject (#839).
Add resources and datasources aci_l4_l7_redirect_health_group (vnsRedirectHealthGroup), aci_l4_l7_logical_interface (vnsLIf), aci_l4_l7_device (vnsLDevVip), aci_l4_l7_concrete_interface (vnsCIf) and aci_l4_l7_concrete_device (vnsCDev) (#861, #865, #866, #873, #877)
Add set_dampening block attribute to the aci_action_rule_profile resource and datasource (#857)
Add enable_vm_folder attribute to aci_vmm_domain (#888)

BUG FIXES:
Add example for aci_user_security_domain and aci_security_domain_role
Set filter_ids and filter_entry_ids to computed in aci_contract to fix idempotency issue (#883)

## 2.2.1 (May 13, 2022)
BUG FIXES:
- Fix 71 resources to not fail if object does not exist when refreshing state.
Expand Down
75 changes: 38 additions & 37 deletions aci/resource_aci_vnsredirecthealthgroup_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -9,58 +9,59 @@ import (
"github.com/hashicorp/terraform-plugin-sdk/v2/helper/resource"
"github.com/hashicorp/terraform-plugin-sdk/v2/terraform"
)
func TestAccAciL4-L7RedirectHealthGroup_Basic(t *testing.T) {
var l4-l7_redirect_health_group models.L4-L7RedirectHealthGroup

func TestAccAciL4goL7RedirectHealthGroup_Basic(t *testing.T) {
var l4l7_redirect_health_group models.L4L7RedirectHealthGroup
fv_tenant_name := acctest.RandString(5)
vns_redirect_health_group_name := acctest.RandString(5)
description := "l4-l7_redirect_health_group created while acceptance testing"

resource.Test(t, resource.TestCase{
PreCheck: func(){ testAccPreCheck(t) },
PreCheck: func() { testAccPreCheck(t) },
Providers: testAccProviders,
CheckDestroy: testAccCheckAciL4-L7RedirectHealthGroupDestroy,
CheckDestroy: testAccCheckAciL4L7RedirectHealthGroupDestroy,
Steps: []resource.TestStep{
{
Config: testAccCheckAciL4-L7RedirectHealthGroupConfig_basic(fv_tenant_name, vns_redirect_health_group_name),
Config: testAccCheckAciL4L7RedirectHealthGroupConfig_basic(fv_tenant_name, vns_redirect_health_group_name),
Check: resource.ComposeTestCheckFunc(
testAccCheckAciL4-L7RedirectHealthGroupExists("aci_l4_l7_redirect_health_group.foo_l4-l7_redirect_health_group", &l4-l7_redirect_health_group),
testAccCheckAciL4-L7RedirectHealthGroupAttributes(fv_tenant_name, vns_redirect_health_group_name, description, &l4-l7_redirect_health_group),
testAccCheckAciL4L7RedirectHealthGroupExists("aci_l4_l7_redirect_health_group.foo_l4-l7_redirect_health_group", &L4L7_redirect_health_group),
testAccCheckAciL4L7RedirectHealthGroupAttributes(fv_tenant_name, vns_redirect_health_group_name, description, &L4L7_redirect_health_group),
),
},
},
})
}

func TestAccAciL4-L7RedirectHealthGroup_Update(t *testing.T) {
var l4-l7_redirect_health_group models.L4-L7RedirectHealthGroup
func TestAccAciL4L7RedirectHealthGroup_Update(t *testing.T) {
var l4l7_redirect_health_group models.L4L7RedirectHealthGroup
fv_tenant_name := acctest.RandString(5)
vns_redirect_health_group_name := acctest.RandString(5)
description := "l4-l7_redirect_health_group created while acceptance testing"
description := "l4l7_redirect_health_group created while acceptance testing"

resource.Test(t, resource.TestCase{
PreCheck: func(){ testAccPreCheck(t) },
PreCheck: func() { testAccPreCheck(t) },
Providers: testAccProviders,
CheckDestroy: testAccCheckAciL4-L7RedirectHealthGroupDestroy,
CheckDestroy: testAccCheckAciL4L7RedirectHealthGroupDestroy,
Steps: []resource.TestStep{
{
Config: testAccCheckAciL4-L7RedirectHealthGroupConfig_basic(fv_tenant_name, vns_redirect_health_group_name),
Config: testAccCheckAciL4L7RedirectHealthGroupConfig_basic(fv_tenant_name, vns_redirect_health_group_name),
Check: resource.ComposeTestCheckFunc(
testAccCheckAciL4-L7RedirectHealthGroupExists("aci_l4_l7_redirect_health_group.foo_l4-l7_redirect_health_group", &l4-l7_redirect_health_group),
testAccCheckAciL4-L7RedirectHealthGroupAttributes(fv_tenant_name, vns_redirect_health_group_name, description, &l4-l7_redirect_health_group),
testAccCheckAciL4L7RedirectHealthGroupExists("aci_l4_l7_redirect_health_group.foo_l4-l7_redirect_health_group", &L4L7_redirect_health_group),
testAccCheckAciL4L7RedirectHealthGroupAttributes(fv_tenant_name, vns_redirect_health_group_name, description, &L4L7_redirect_health_group),
),
},
{
Config: testAccCheckAciL4-L7RedirectHealthGroupConfig_basic(fv_tenant_name, vns_redirect_health_group_name),
Config: testAccCheckAciL4L7RedirectHealthGroupConfig_basic(fv_tenant_name, vns_redirect_health_group_name),
Check: resource.ComposeTestCheckFunc(
testAccCheckAciL4-L7RedirectHealthGroupExists("aci_l4_l7_redirect_health_group.foo_l4-l7_redirect_health_group", &l4-l7_redirect_health_group),
testAccCheckAciL4-L7RedirectHealthGroupAttributes(fv_tenant_name, vns_redirect_health_group_name, description, &l4-l7_redirect_health_group),
testAccCheckAciL4L7RedirectHealthGroupExists("aci_l4_l7_redirect_health_group.foo_l4-l7_redirect_health_group", &L4L7_redirect_health_group),
testAccCheckAciL4L7RedirectHealthGroupAttributes(fv_tenant_name, vns_redirect_health_group_name, description, &L4L7_redirect_health_group),
),
},
},
})
}

func testAccCheckAciL4-L7RedirectHealthGroupConfig_basic(fv_tenant_name, vns_redirect_health_group_name string) string {
func testAccCheckAciL4L7RedirectHealthGroupConfig_basic(fv_tenant_name, vns_redirect_health_group_name string) string {
return fmt.Sprintf(`
resource "aci_tenant" "foo_tenant" {
Expand All @@ -78,7 +79,7 @@ func testAccCheckAciL4-L7RedirectHealthGroupConfig_basic(fv_tenant_name, vns_red
`, fv_tenant_name, vns_redirect_health_group_name)
}

func testAccCheckAciL4-L7RedirectHealthGroupExists(name string, l4-l7_redirect_health_group *models.L4-L7RedirectHealthGroup) resource.TestCheckFunc {
func testAccCheckAciL4L7RedirectHealthGroupExists(name string, l4l7_redirect_health_group *models.L4L7RedirectHealthGroup) resource.TestCheckFunc {
return func(s *terraform.State) error {
rs, ok := s.RootModule().Resources[name]

Expand All @@ -97,42 +98,42 @@ func testAccCheckAciL4-L7RedirectHealthGroupExists(name string, l4-l7_redirect_h
return err
}

l4-l7_redirect_health_groupFound := models.L4-L7RedirectHealthGroupFromContainer(cont)
if l4-l7_redirect_health_groupFound.DistinguishedName != rs.Primary.ID {
l4l7_redirect_health_groupFound := models.L4 - L7RedirectHealthGroupFromContainer(cont)
if l4l7_redirect_health_groupFound.DistinguishedName != rs.Primary.ID {
return fmt.Errorf("L4-L7 Redirect Health Group %s not found", rs.Primary.ID)
}
*l4-l7_redirect_health_group = *l4-l7_redirect_health_groupFound
*l4 - l7_redirect_health_group = *l4l7_redirect_health_groupFound
return nil
}
}

func testAccCheckAciL4-L7RedirectHealthGroupDestroy(s *terraform.State) error {
func testAccCheckAciL4L7RedirectHealthGroupDestroy(s *terraform.State) error {
client := testAccProvider.Meta().(*client.Client)
for _, rs := range s.RootModule().Resources {
if rs.Type == "aci_l4_l7_redirect_health_group" {
cont,err := client.Get(rs.Primary.ID)
l4-l7_redirect_health_group := models.L4-L7RedirectHealthGroupFromContainer(cont)
if rs.Type == "aci_l4_l7_redirect_health_group" {
cont, err := client.Get(rs.Primary.ID)
l4l7_redirect_health_group := models.L4L7RedirectHealthGroupFromContainer(cont)
if err == nil {
return fmt.Errorf("L4-L7 Redirect Health Group %s Still exists",l4-l7_redirect_health_group.DistinguishedName)
return fmt.Errorf("L4-L7 Redirect Health Group %s Still exists", l4l7_redirect_health_group.DistinguishedName)
}
}else{
} else {
continue
}
}
return nil
}

func testAccCheckAciL4-L7RedirectHealthGroupAttributes(fv_tenant_name, vns_redirect_health_group_name, description string, l4-l7_redirect_health_group *models.L4-L7RedirectHealthGroup) resource.TestCheckFunc {
func testAccCheckAciL4L7RedirectHealthGroupAttributes(fv_tenant_name, vns_redirect_health_group_name, description string, l4l7_redirect_health_group *models.L4L7RedirectHealthGroup) resource.TestCheckFunc {
return func(s *terraform.State) error {
if vns_redirect_health_group_name != GetMOName(l4-l7_redirect_health_group.DistinguishedName) {
return fmt.Errorf("Bad vns_redirect_health_group %s", GetMOName(l4-l7_redirect_health_group.DistinguishedName))
if vns_redirect_health_group_name != GetMOName(l4l7_redirect_health_group.DistinguishedName) {
return fmt.Errorf("Bad vns_redirect_health_group %s", GetMOName(l4l7_redirect_health_group.DistinguishedName))
}
if fv_tenant_name != GetMOName(GetParentDn(l4-l7_redirect_health_group.DistinguishedName,l4-l7_redirect_health_group.Rn)){
return fmt.Errorf(" Bad fv_tenant %s", GetMOName(GetParentDn(l4-l7_redirect_health_group.DistinguishedName,l4-l7_redirect_health_group.Rn)))

if fv_tenant_name != GetMOName(GetParentDn(l4l7_redirect_health_group.DistinguishedName, l4l7_redirect_health_group.Rn)) {
return fmt.Errorf(" Bad fv_tenant %s", GetMOName(GetParentDn(l4l7_redirect_health_group.DistinguishedName, l4l7_redirect_health_group.Rn)))
}
if description != l4-l7_redirect_health_group.Description {
return fmt.Errorf("Bad l4-l7_redirect_health_group Description %s", l4-l7_redirect_health_group.Description)
if description != l4l7_redirect_health_group.Description {
return fmt.Errorf("Bad l4-l7_redirect_health_group Description %s", l4l7_redirect_health_group.Description)
}
return nil
}
Expand Down

0 comments on commit b0c80ab

Please sign in to comment.