-
Notifications
You must be signed in to change notification settings - Fork 101
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
* CACIT-71 inline block added * CACIT-72 attribute renamed * CACIT-72 docs updated * CACIT-74 resource ds added * CACIT-75 logic added * CACIT-74 test file added * CACIT-76 parent_dn logic added * CACIT-77 logic added for ctrl * CACIT-77 docs and test file updated * CACIT-79 resource aaaDomain added * CACIT-78 index.html updated * removed relation * CACIT-83 made scope attr as list * Cacit 82 83 84 85 (#143) * CACIT-85 TGW in ctxProfile * CACIT-85 TGW in ctxProfile * CACIT-84 cloudSubnet zone update * CACIT-85 done * CACIT-85 fomatting Done * CACIT-71 inline block added * CACIT-72 attribute renamed * CACIT-72 docs updated * CACIT-74 resource ds added * CACIT-75 logic added * CACIT-74 test file added * CACIT-76 parent_dn logic added * CACIT-77 logic added for ctrl * CACIT-77 docs and test file updated * CACIT-79 resource aaaDomain added * CACIT-78 index.html updated * removed relation * CACIT-83 made scope attr as list * Cacit 82 83 84 85 (#143) * CACIT-85 TGW in ctxProfile * CACIT-85 TGW in ctxProfile * CACIT-84 cloudSubnet zone update * CACIT-85 done * CACIT-85 fomatting Done * Done
- Loading branch information
1 parent
8f18d89
commit 355a01f
Showing
167 changed files
with
2,638 additions
and
269 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,49 @@ | ||
package aci | ||
|
||
import ( | ||
"fmt" | ||
|
||
"github.com/ciscoecosystem/aci-go-client/client" | ||
"github.com/hashicorp/terraform-plugin-sdk/helper/schema" | ||
) | ||
|
||
func dataSourceAciSecurityDomain() *schema.Resource { | ||
return &schema.Resource{ | ||
|
||
Read: dataSourceAciSecurityDomainRead, | ||
|
||
SchemaVersion: 1, | ||
|
||
Schema: AppendBaseAttrSchema(map[string]*schema.Schema{ | ||
|
||
"name": &schema.Schema{ | ||
Type: schema.TypeString, | ||
Required: true, | ||
}, | ||
|
||
"name_alias": &schema.Schema{ | ||
Type: schema.TypeString, | ||
Optional: true, | ||
Computed: true, | ||
}, | ||
}), | ||
} | ||
} | ||
|
||
func dataSourceAciSecurityDomainRead(d *schema.ResourceData, m interface{}) error { | ||
aciClient := m.(*client.Client) | ||
|
||
name := d.Get("name").(string) | ||
|
||
rn := fmt.Sprintf("userext/domain-%s", name) | ||
|
||
dn := fmt.Sprintf("uni/%s", rn) | ||
|
||
aaaDomain, err := getRemoteSecurityDomain(aciClient, dn) | ||
|
||
if err != nil { | ||
return err | ||
} | ||
setSecurityDomainAttributes(aaaDomain, d) | ||
return nil | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,73 @@ | ||
package aci | ||
|
||
import ( | ||
"fmt" | ||
|
||
"github.com/ciscoecosystem/aci-go-client/client" | ||
"github.com/hashicorp/terraform-plugin-sdk/helper/schema" | ||
) | ||
|
||
func dataSourceAciLinkLevelPolicy() *schema.Resource { | ||
return &schema.Resource{ | ||
|
||
Read: dataSourceAciLinkLevelPolicyRead, | ||
|
||
SchemaVersion: 1, | ||
|
||
Schema: AppendBaseAttrSchema(map[string]*schema.Schema{ | ||
|
||
"name": &schema.Schema{ | ||
Type: schema.TypeString, | ||
Required: true, | ||
}, | ||
|
||
"auto_neg": &schema.Schema{ | ||
Type: schema.TypeString, | ||
Optional: true, | ||
Computed: true, | ||
}, | ||
|
||
"fec_mode": &schema.Schema{ | ||
Type: schema.TypeString, | ||
Optional: true, | ||
Computed: true, | ||
}, | ||
|
||
"link_debounce": &schema.Schema{ | ||
Type: schema.TypeString, | ||
Optional: true, | ||
Computed: true, | ||
}, | ||
|
||
"name_alias": &schema.Schema{ | ||
Type: schema.TypeString, | ||
Optional: true, | ||
Computed: true, | ||
}, | ||
|
||
"speed": &schema.Schema{ | ||
Type: schema.TypeString, | ||
Optional: true, | ||
Computed: true, | ||
}, | ||
}), | ||
} | ||
} | ||
|
||
func dataSourceAciLinkLevelPolicyRead(d *schema.ResourceData, m interface{}) error { | ||
aciClient := m.(*client.Client) | ||
|
||
name := d.Get("name").(string) | ||
|
||
rn := fmt.Sprintf("infra/hintfpol-%s", name) | ||
|
||
dn := fmt.Sprintf("uni/%s", rn) | ||
|
||
fabricHIfPol, err := getRemoteLinkLevelPolicy(aciClient, dn) | ||
|
||
if err != nil { | ||
return err | ||
} | ||
setLinkLevelPolicyAttributes(fabricHIfPol, d) | ||
return nil | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.