Skip to content

Commit

Permalink
Merge pull request #103 from CiscoISE/develop
Browse files Browse the repository at this point in the history
Develop v0.6.22-beta
  • Loading branch information
fmunozmiranda authored Aug 10, 2023
2 parents b67c0ec + 7f7d336 commit adf2efe
Show file tree
Hide file tree
Showing 175 changed files with 839 additions and 207 deletions.
3 changes: 2 additions & 1 deletion .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -51,4 +51,5 @@ vendor/
*.log


examples/samples/*/*.xml
examples/samples/*/*.xml
env.sh
5 changes: 5 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,3 +1,8 @@
## 0.6.22-beta (August 09, 2023)
BUG FIXES:
* Resource 'ciscoise_network_access_policy_set' does not support nested children blocks #101
* No request_basic_pwd_auth parameter available in ciscoise_allowed_protocols resource in teap block #99

## 0.6.21-beta (June 27, 2023)
BUG FIXES:
* ciscoise_internal_user import results in Error #88
Expand Down
2 changes: 1 addition & 1 deletion Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ HOSTNAME=hashicorp.com
NAMESPACE=edu
NAME=ciscoise
BINARY=terraform-provider-${NAME}
VERSION=0.6.21-beta
VERSION=0.6.22-beta
OS_ARCH=darwin_amd64
GOFMT_FILES?=$$(find . -name '*.go' |grep -v vendor)
default: install
Expand Down
6 changes: 3 additions & 3 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,7 @@ terraform {
required_providers {
ciscoise = {
source = "CiscoISE/ciscoise"
version = "0.6.21-beta"
version = "0.6.22-beta"
}
}
}
Expand Down Expand Up @@ -67,7 +67,7 @@ terraform {
required_providers {
ciscoise = {
source = "hashicorp.com/edu/ciscoise"
version = "0.6.21-beta"
version = "0.6.22-beta"
}
}
}
Expand Down Expand Up @@ -119,7 +119,7 @@ The following table shows the supported versions.

| Cisco ISE version | Terraform "ciscoise" provider version | Go "ciscoise-go-sdk" version|
|-------------------|---------------------------------------|---------------------|
| 3.1._Patch_1 | 0.6.21-beta | 1.1.19 |
| 3.1._Patch_1 | 0.6.22-beta | 1.1.19 |

If your SDK, Terraform provider is older please consider updating it first.

Expand Down
156 changes: 152 additions & 4 deletions ciscoise/data_source_network_access_policy_set.go
Original file line number Diff line number Diff line change
Expand Up @@ -127,6 +127,77 @@ func dataSourceNetworkAccessPolicySet() *schema.Resource {
Type: schema.TypeString,
Computed: true,
},
"children": &schema.Schema{
Description: `In case type is andBlock or orBlock addtional conditions will be aggregated under this logical (OR/AND) condition`,
Type: schema.TypeList,
Computed: true,
Elem: &schema.Resource{
Schema: map[string]*schema.Schema{

"attribute_name": &schema.Schema{
Description: `Atribute Name`,
Type: schema.TypeString,
Computed: true,
},
"attribute_value": &schema.Schema{
Description: `Attibute Name`,
Type: schema.TypeString,
Computed: true,
},
"condition_type": &schema.Schema{
Description: `<ul><li>Inidicates whether the record is the condition itself(data) or a logical(or,and) aggregation</li> <li>Data type enum(reference,single) indicates than "conditonId" OR "ConditionAttrs" fields should contain condition data but not both</li> <li>Logical aggreation(and,or) enum indicates that additional conditions are present under the children field</li></ul>`,
Type: schema.TypeString,
Computed: true,
},
"dictionary_name": &schema.Schema{
Description: `Dictionary Name`,
Type: schema.TypeString,
Computed: true,
},
"is_negate": &schema.Schema{
Description: `Indicates whereas this condition is in negate mode`,
Type: schema.TypeString,
Computed: true,
},
"link": &schema.Schema{
Type: schema.TypeList,
Computed: true,
Elem: &schema.Resource{
Schema: map[string]*schema.Schema{

"href": &schema.Schema{
Type: schema.TypeString,
Computed: true,
},
"rel": &schema.Schema{
Type: schema.TypeString,
Computed: true,
},
"type": &schema.Schema{
Type: schema.TypeString,
Computed: true,
},
},
},
},
"operator": &schema.Schema{
Description: `Operator`,
Type: schema.TypeString,
Computed: true,
},
"id": &schema.Schema{
Description: `id`,
Type: schema.TypeString,
Computed: true,
},
"dictionary_value": &schema.Schema{
Description: `dictionary_value`,
Type: schema.TypeString,
Computed: true,
},
},
},
},
},
},
},
Expand Down Expand Up @@ -445,6 +516,77 @@ func dataSourceNetworkAccessPolicySet() *schema.Resource {
Type: schema.TypeString,
Computed: true,
},
"children": &schema.Schema{
Description: `In case type is andBlock or orBlock addtional conditions will be aggregated under this logical (OR/AND) condition`,
Type: schema.TypeList,
Computed: true,
Elem: &schema.Resource{
Schema: map[string]*schema.Schema{

"attribute_name": &schema.Schema{
Description: `Atribute Name`,
Type: schema.TypeString,
Computed: true,
},
"attribute_value": &schema.Schema{
Description: `Attibute Name`,
Type: schema.TypeString,
Computed: true,
},
"condition_type": &schema.Schema{
Description: `<ul><li>Inidicates whether the record is the condition itself(data) or a logical(or,and) aggregation</li> <li>Data type enum(reference,single) indicates than "conditonId" OR "ConditionAttrs" fields should contain condition data but not both</li> <li>Logical aggreation(and,or) enum indicates that additional conditions are present under the children field</li></ul>`,
Type: schema.TypeString,
Computed: true,
},
"dictionary_name": &schema.Schema{
Description: `Dictionary Name`,
Type: schema.TypeString,
Computed: true,
},
"is_negate": &schema.Schema{
Description: `Indicates whereas this condition is in negate mode`,
Type: schema.TypeString,
Computed: true,
},
"link": &schema.Schema{
Type: schema.TypeList,
Computed: true,
Elem: &schema.Resource{
Schema: map[string]*schema.Schema{

"href": &schema.Schema{
Type: schema.TypeString,
Computed: true,
},
"rel": &schema.Schema{
Type: schema.TypeString,
Computed: true,
},
"type": &schema.Schema{
Type: schema.TypeString,
Computed: true,
},
},
},
},
"operator": &schema.Schema{
Description: `Operator`,
Type: schema.TypeString,
Computed: true,
},
"id": &schema.Schema{
Description: `id`,
Type: schema.TypeString,
Computed: true,
},
"dictionary_value": &schema.Schema{
Description: `dictionary_value`,
Type: schema.TypeString,
Computed: true,
},
},
},
},
},
},
},
Expand Down Expand Up @@ -813,7 +955,7 @@ func flattenNetworkAccessPolicySetGetNetworkAccessPolicySetsItemsConditionLink(i

}

func flattenNetworkAccessPolicySetGetNetworkAccessPolicySetsItemsConditionChildren(items *[]isegosdk.ResponseNetworkAccessPolicySetGetNetworkAccessPolicySetsResponseConditionChildren) []map[string]interface{} {
func flattenNetworkAccessPolicySetGetNetworkAccessPolicySetsItemsConditionChildren(items *[]isegosdk.ResponseNetworkAccessPolicySetGetNetworkAccessPolicySetsResponseCondition) []map[string]interface{} {
if items == nil {
return nil
}
Expand All @@ -823,6 +965,9 @@ func flattenNetworkAccessPolicySetGetNetworkAccessPolicySetsItemsConditionChildr
respItem["condition_type"] = item.ConditionType
respItem["is_negate"] = boolPtrToString(item.IsNegate)
respItem["link"] = flattenNetworkAccessPolicySetGetNetworkAccessPolicySetsItemsConditionChildrenLink(item.Link)
if item.Children != nil {
respItem["children"] = flattenNetworkAccessPolicySetGetNetworkAccessPolicySetsItemsConditionChildren(item.Children)
}
respItem["dictionary_name"] = item.DictionaryName
respItem["attribute_name"] = item.AttributeName
respItem["operator"] = item.Operator
Expand All @@ -833,7 +978,7 @@ func flattenNetworkAccessPolicySetGetNetworkAccessPolicySetsItemsConditionChildr
return respItems
}

func flattenNetworkAccessPolicySetGetNetworkAccessPolicySetsItemsConditionChildrenLink(item *isegosdk.ResponseNetworkAccessPolicySetGetNetworkAccessPolicySetsResponseConditionChildrenLink) []map[string]interface{} {
func flattenNetworkAccessPolicySetGetNetworkAccessPolicySetsItemsConditionChildrenLink(item *isegosdk.ResponseNetworkAccessPolicySetGetNetworkAccessPolicySetsResponseConditionLink) []map[string]interface{} {
if item == nil {
return nil
}
Expand Down Expand Up @@ -985,7 +1130,7 @@ func flattenNetworkAccessPolicySetGetNetworkAccessPolicySetByIDItemConditionLink

}

func flattenNetworkAccessPolicySetGetNetworkAccessPolicySetByIDItemConditionChildren(items *[]isegosdk.ResponseNetworkAccessPolicySetGetNetworkAccessPolicySetByIDResponseConditionChildren) []map[string]interface{} {
func flattenNetworkAccessPolicySetGetNetworkAccessPolicySetByIDItemConditionChildren(items *[]isegosdk.ResponseNetworkAccessPolicySetGetNetworkAccessPolicySetByIDResponseCondition) []map[string]interface{} {
if items == nil {
return nil
}
Expand All @@ -995,6 +1140,9 @@ func flattenNetworkAccessPolicySetGetNetworkAccessPolicySetByIDItemConditionChil
respItem["condition_type"] = item.ConditionType
respItem["is_negate"] = boolPtrToString(item.IsNegate)
respItem["link"] = flattenNetworkAccessPolicySetGetNetworkAccessPolicySetByIDItemConditionChildrenLink(item.Link)
if item.Children != nil {
respItem["children"] = flattenNetworkAccessPolicySetGetNetworkAccessPolicySetByIDItemConditionChildren(item.Children) //modify here
}
respItem["dictionary_name"] = item.DictionaryName
respItem["attribute_name"] = item.AttributeName
respItem["operator"] = item.Operator
Expand All @@ -1005,7 +1153,7 @@ func flattenNetworkAccessPolicySetGetNetworkAccessPolicySetByIDItemConditionChil
return respItems
}

func flattenNetworkAccessPolicySetGetNetworkAccessPolicySetByIDItemConditionChildrenLink(item *isegosdk.ResponseNetworkAccessPolicySetGetNetworkAccessPolicySetByIDResponseConditionChildrenLink) []map[string]interface{} {
func flattenNetworkAccessPolicySetGetNetworkAccessPolicySetByIDItemConditionChildrenLink(item *isegosdk.ResponseNetworkAccessPolicySetGetNetworkAccessPolicySetByIDResponseConditionLink) []map[string]interface{} {
if item == nil {
return nil
}
Expand Down
17 changes: 17 additions & 0 deletions ciscoise/resource_allowed_protocols.go
Original file line number Diff line number Diff line change
Expand Up @@ -500,6 +500,10 @@ Valid range is 0-3`,
Type: schema.TypeString,
Computed: true,
},
"request_basic_pwd_auth": &schema.Schema{
Type: schema.TypeString,
Computed: true,
},
},
},
},
Expand Down Expand Up @@ -1189,6 +1193,13 @@ Valid range is 0-3`,
DiffSuppressFunc: diffSupressBool(),
Computed: true,
},
"request_basic_pwd_auth": &schema.Schema{
Type: schema.TypeString,
ValidateFunc: validateStringHasValueFunc([]string{"", "true", "false"}),
Optional: true,
DiffSuppressFunc: diffSupressBool(),
Computed: true,
},
},
},
},
Expand Down Expand Up @@ -1760,6 +1771,9 @@ func expandRequestAllowedProtocolsCreateAllowedProtocolAllowedProtocolsTeap(ctx
if v, ok := d.GetOkExists(fixKeyAccess(key + ".allow_downgrade_msk")); !isEmptyValue(reflect.ValueOf(d.Get(fixKeyAccess(key+".allow_downgrade_msk")))) && (ok || !reflect.DeepEqual(v, d.Get(fixKeyAccess(key+".allow_downgrade_msk")))) {
request.AllowDowngradeMsk = interfaceToBoolPtr(v)
}
if v, ok := d.GetOkExists(fixKeyAccess(key + ".request_basic_pwd_auth")); !isEmptyValue(reflect.ValueOf(d.Get(fixKeyAccess(key+".request_basic_pwd_auth")))) && (ok || !reflect.DeepEqual(v, d.Get(fixKeyAccess(key+".request_basic_pwd_auth")))) {
request.RequestBasicPwdAuth = interfaceToBoolPtr(v)
}
if isEmptyValue(reflect.ValueOf(request)) {
return nil
}
Expand Down Expand Up @@ -2149,6 +2163,9 @@ func expandRequestAllowedProtocolsUpdateAllowedProtocolByIDAllowedProtocolsTeap(
if v, ok := d.GetOkExists(fixKeyAccess(key + ".allow_downgrade_msk")); !isEmptyValue(reflect.ValueOf(d.Get(fixKeyAccess(key+".allow_downgrade_msk")))) && (ok || !reflect.DeepEqual(v, d.Get(fixKeyAccess(key+".allow_downgrade_msk")))) {
request.AllowDowngradeMsk = interfaceToBoolPtr(v)
}
if v, ok := d.GetOkExists(fixKeyAccess(key + ".request_basic_pwd_auth")); !isEmptyValue(reflect.ValueOf(d.Get(fixKeyAccess(key+".request_basic_pwd_auth")))) && (ok || !reflect.DeepEqual(v, d.Get(fixKeyAccess(key+".request_basic_pwd_auth")))) {
request.RequestBasicPwdAuth = interfaceToBoolPtr(v)
}
if isEmptyValue(reflect.ValueOf(request)) {
return nil
}
Expand Down
Loading

0 comments on commit adf2efe

Please sign in to comment.