Skip to content

Commit

Permalink
Merge pull request #114 from Atul9/rename-aci_switch_association
Browse files Browse the repository at this point in the history
Rename aci_switch_association to aci_leaf_selector
  • Loading branch information
nkatarmal-crest authored Sep 16, 2020
2 parents 20ac0a2 + bf7542f commit 28a159d
Show file tree
Hide file tree
Showing 8 changed files with 33 additions and 33 deletions.
4 changes: 2 additions & 2 deletions aci/provider.go
Original file line number Diff line number Diff line change
Expand Up @@ -111,7 +111,7 @@ func Provider() terraform.ResourceProvider {
"aci_action_rule_profile": resourceAciActionRuleProfile(),
"aci_trigger_scheduler": resourceAciTriggerScheduler(),
"aci_taboo_contract": resourceAciTabooContract(),
"aci_switch_association": resourceAciSwitchAssociation(),
"aci_leaf_selector": resourceAciSwitchAssociation(),
"aci_span_destination_group": resourceAciSPANDestinationGroup(),
"aci_span_source_group": resourceAciSPANSourceGroup(),
"aci_span_sourcedestination_group_match_label": resourceAciSPANSourcedestinationGroupMatchLabel(),
Expand Down Expand Up @@ -209,7 +209,7 @@ func Provider() terraform.ResourceProvider {
"aci_action_rule_profile": dataSourceAciActionRuleProfile(),
"aci_trigger_scheduler": dataSourceAciTriggerScheduler(),
"aci_taboo_contract": dataSourceAciTabooContract(),
"aci_switch_association": dataSourceAciSwitchAssociation(),
"aci_leaf_selector": dataSourceAciSwitchAssociation(),
"aci_span_destination_group": dataSourceAciSPANDestinationGroup(),
"aci_span_source_group": dataSourceAciSPANSourceGroup(),
"aci_span_sourcedestination_group_match_label": dataSourceAciSPANSourcedestinationGroupMatchLabel(),
Expand Down
16 changes: 8 additions & 8 deletions aci/resource_aci_infraleafs_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -22,12 +22,12 @@ func TestAccAciSwitchAssociation_Basic(t *testing.T) {
{
Config: testAccCheckAciSwitchAssociationConfig_basic(description),
Check: resource.ComposeTestCheckFunc(
testAccCheckAciSwitchAssociationExists("aci_switch_association.fooswitch_association", &switch_association),
testAccCheckAciSwitchAssociationExists("aci_leaf_selector.fooswitch_association", &switch_association),
testAccCheckAciSwitchAssociationAttributes(description, &switch_association),
),
},
{
ResourceName: "aci_switch_association",
ResourceName: "aci_leaf_selector",
ImportState: true,
ImportStateVerify: true,
},
Expand All @@ -47,14 +47,14 @@ func TestAccAciSwitchAssociation_update(t *testing.T) {
{
Config: testAccCheckAciSwitchAssociationConfig_basic(description),
Check: resource.ComposeTestCheckFunc(
testAccCheckAciSwitchAssociationExists("aci_switch_association.fooswitch_association", &switch_association),
testAccCheckAciSwitchAssociationExists("aci_leaf_selector.fooswitch_association", &switch_association),
testAccCheckAciSwitchAssociationAttributes(description, &switch_association),
),
},
{
Config: testAccCheckAciSwitchAssociationConfig_basic(description),
Check: resource.ComposeTestCheckFunc(
testAccCheckAciSwitchAssociationExists("aci_switch_association.fooswitch_association", &switch_association),
testAccCheckAciSwitchAssociationExists("aci_leaf_selector.fooswitch_association", &switch_association),
testAccCheckAciSwitchAssociationAttributes(description, &switch_association),
),
},
Expand All @@ -65,12 +65,12 @@ func TestAccAciSwitchAssociation_update(t *testing.T) {
func testAccCheckAciSwitchAssociationConfig_basic(description string) string {
return fmt.Sprintf(`
resource "aci_switch_association" "fooswitch_association" {
resource "aci_leaf_selector" "fooswitch_association" {
leaf_profile_dn = "${aci_leaf_profile.example.id}"
description = "%s"
name = "example"
switch_association_type = "range"
annotation = "example"
name_alias = "example"
Expand Down Expand Up @@ -111,7 +111,7 @@ func testAccCheckAciSwitchAssociationDestroy(s *terraform.State) error {

for _, rs := range s.RootModule().Resources {

if rs.Type == "aci_switch_association" {
if rs.Type == "aci_leaf_selector" {
cont, err := client.Get(rs.Primary.ID)
switch_association := models.SwitchAssociationFromContainer(cont)
if err == nil {
Expand Down
4 changes: 2 additions & 2 deletions aci/resource_aci_infranodeblk_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -66,9 +66,9 @@ func testAccCheckAciInfraNodeBlockConfig_basic(description string) string {
return fmt.Sprintf(`
resource "aci_node_block" "foonode_block" {
switch_association_dn = "${aci_switch_association.example.id}"
switch_association_dn = "${aci_leaf_selector.example.id}"
description = "%s"
name = "example"
annotation = "example"
from_ = "105"
Expand Down
8 changes: 4 additions & 4 deletions website/aci.erb
Original file line number Diff line number Diff line change
Expand Up @@ -258,8 +258,8 @@
<li<%= sidebar_current("docs-aci-data-source-subnet") %>>
<a href="/docs/providers/aci/d/fvsubnet.html">aci_subnet</a>
</li>
<li<%= sidebar_current("docs-aci-data-source-switch_association") %>>
<a href="/docs/providers/aci/d/infraleafs.html">aci_switch_association</a>
<li<%= sidebar_current("docs-aci-data-source-leaf_selector") %>>
<a href="/docs/providers/aci/d/infraleafs.html">aci_leaf_selector</a>
</li>
<li<%= sidebar_current("docs-aci-data-source-taboo_contract") %>>
<a href="/docs/providers/aci/d/vztaboo.html">aci_taboo_contract</a>
Expand Down Expand Up @@ -549,8 +549,8 @@
<li<%= sidebar_current("docs-aci-resource-subnet") %>>
<a href="/docs/providers/aci/r/fvsubnet.html">aci_subnet</a>
</li>
<li<%= sidebar_current("docs-aci-resource-switch_association") %>>
<a href="/docs/providers/aci/r/infraleafs.html">aci_switch_association</a>
<li<%= sidebar_current("docs-aci-resource-leaf_selector") %>>
<a href="/docs/providers/aci/r/infraleafs.html">aci_leaf_selector</a>
</li>
<li<%= sidebar_current("docs-aci-resource-taboo_contract") %>>
<a href="/docs/providers/aci/r/vztaboo.html">aci_taboo_contract</a>
Expand Down
12 changes: 6 additions & 6 deletions website/docs/d/infraleafs.html.markdown
Original file line number Diff line number Diff line change
@@ -1,18 +1,18 @@
---
layout: "aci"
page_title: "ACI: aci_switch_association"
sidebar_current: "docs-aci-data-source-switch_association"
page_title: "ACI: aci_leaf_selector"
sidebar_current: "docs-aci-data-source-leaf_selector"
description: |-
Data source for ACI Switch Association
Data source for ACI Leaf Selector
---

# aci_switch_association #
Data source for ACI Switch Association
# aci_leaf_selector #
Data source for ACI Leaf Selector

## Example Usage ##

```hcl
data "aci_switch_association" "example" {
data "aci_leaf_selector" "example" {
leaf_profile_dn = "${aci_leaf_profile.example.id}"
Expand Down
2 changes: 1 addition & 1 deletion website/docs/d/infranodeblk.html.markdown
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@ Data source for ACI Node Block

```hcl
data "aci_node_block" "example" {
switch_association_dn = "${aci_switch_association.example.id}"
switch_association_dn = "${aci_leaf_selector.example.id}"
name = "example"
}
```
Expand Down
16 changes: 8 additions & 8 deletions website/docs/r/infraleafs.html.markdown
Original file line number Diff line number Diff line change
@@ -1,18 +1,18 @@
---
layout: "aci"
page_title: "ACI: aci_switch_association"
sidebar_current: "docs-aci-resource-switch_association"
page_title: "ACI: aci_leaf_selector"
sidebar_current: "docs-aci-resource-leaf_selector"
description: |-
Manages ACI Switch Association
Manages ACI Leaf Selector
---

# aci_switch_association #
Manages ACI Switch Association
# aci_leaf_selector #
Manages ACI Leaf Selector

## Example Usage ##

```hcl
resource "aci_switch_association" "example" {
resource "aci_leaf_selector" "example" {
leaf_profile_dn = "${aci_leaf_profile.example.id}"
Expand Down Expand Up @@ -48,5 +48,5 @@ An existing Switch Association can be [imported][docs-import] into this resource


```
terraform import aci_switch_association.example <Dn>
```
terraform import aci_leaf_selector.example <Dn>
```
4 changes: 2 additions & 2 deletions website/docs/r/infranodeblk.html.markdown
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@ Manages ACI Node Block

```hcl
resource "aci_node_block" "check" {
switch_association_dn = "${aci_switch_association.example.id}"
switch_association_dn = "${aci_leaf_selector.example.id}"
name = "block"
annotation = "aci_node_block"
from_ = "105"
Expand Down Expand Up @@ -44,4 +44,4 @@ An existing Node Block can be [imported][docs-import] into this resource via its

```
terraform import aci_node_block.example <Dn>
```
```

0 comments on commit 28a159d

Please sign in to comment.