Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[bugfix] Prevent error by setting flood_on_encap and prio for aci_end… #1209

Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
14 changes: 0 additions & 14 deletions aci/data_source_aci_fvesg.go
Original file line number Diff line number Diff line change
Expand Up @@ -20,17 +20,10 @@ func dataSourceAciEndpointSecurityGroup() *schema.Resource {
},
"annotation": {
Type: schema.TypeString,
Optional: true,
Computed: true,
},
"flood_on_encap": {
Type: schema.TypeString,
Optional: true,
Computed: true,
},
"match_t": {
Type: schema.TypeString,
Optional: true,
Computed: true,
},
"name": {
Expand All @@ -39,17 +32,10 @@ func dataSourceAciEndpointSecurityGroup() *schema.Resource {
},
"pc_enf_pref": {
Type: schema.TypeString,
Optional: true,
Computed: true,
},
"pref_gr_memb": {
Type: schema.TypeString,
Optional: true,
Computed: true,
},
"prio": {
Type: schema.TypeString,
Optional: true,
Computed: true,
},
})),
Expand Down
16 changes: 0 additions & 16 deletions aci/resource_aci_fvesg.go
Original file line number Diff line number Diff line change
Expand Up @@ -206,13 +206,11 @@ func setEndpointSecurityGroupAttributes(fvESg *models.EndpointSecurityGroup, d *
return d, err
}
d.Set("annotation", fvESgMap["annotation"])
d.Set("flood_on_encap", fvESgMap["floodOnEncap"])
d.Set("match_t", fvESgMap["matchT"])
d.Set("name", fvESgMap["name"])
d.Set("application_profile_dn", GetParentDn(fvESg.DistinguishedName, fmt.Sprintf("/esg-%s", fvESgMap["name"])))
d.Set("pc_enf_pref", fvESgMap["pcEnfPref"])
d.Set("pref_gr_memb", fvESgMap["prefGrMemb"])
d.Set("prio", fvESgMap["prio"])
d.Set("name_alias", fvESgMap["nameAlias"])
return d, nil
}
Expand Down Expand Up @@ -251,10 +249,6 @@ func resourceAciEndpointSecurityGroupCreate(ctx context.Context, d *schema.Resou
fvESgAttr.Annotation = "{}"
}

if FloodOnEncap, ok := d.GetOk("flood_on_encap"); ok {
fvESgAttr.FloodOnEncap = FloodOnEncap.(string)
}

if MatchT, ok := d.GetOk("match_t"); ok {
fvESgAttr.MatchT = MatchT.(string)
}
Expand All @@ -271,9 +265,6 @@ func resourceAciEndpointSecurityGroupCreate(ctx context.Context, d *schema.Resou
fvESgAttr.PrefGrMemb = PrefGrMemb.(string)
}

if Prio, ok := d.GetOk("prio"); ok {
fvESgAttr.Prio = Prio.(string)
}
fvESg := models.NewEndpointSecurityGroup(fmt.Sprintf("esg-%s", name), ApplicationProfileDn, desc, nameAlias, fvESgAttr)

err := aciClient.Save(fvESg)
Expand Down Expand Up @@ -450,10 +441,6 @@ func resourceAciEndpointSecurityGroupUpdate(ctx context.Context, d *schema.Resou
fvESgAttr.Annotation = "{}"
}

if FloodOnEncap, ok := d.GetOk("flood_on_encap"); ok {
fvESgAttr.FloodOnEncap = FloodOnEncap.(string)
}

if MatchT, ok := d.GetOk("match_t"); ok {
fvESgAttr.MatchT = MatchT.(string)
}
Expand All @@ -470,9 +457,6 @@ func resourceAciEndpointSecurityGroupUpdate(ctx context.Context, d *schema.Resou
fvESgAttr.PrefGrMemb = PrefGrMemb.(string)
}

if Prio, ok := d.GetOk("prio"); ok {
fvESgAttr.Prio = Prio.(string)
}
fvESg := models.NewEndpointSecurityGroup(fmt.Sprintf("esg-%s", name), ApplicationProfileDn, desc, nameAlias, fvESgAttr)

fvESg.Status = "modified"
Expand Down
18 changes: 7 additions & 11 deletions docs/data-sources/endpoint_security_group.md
Original file line number Diff line number Diff line change
Expand Up @@ -32,18 +32,14 @@ data "aci_endpoint_security_group" "example" {
## Argument Reference ##

* `application_profile_dn` - (Required) Distinguished name of parent Application Profile object.
* `name` - (Required) name of object Endpoint Security Group.
* `name` - (Required) Name of the object Endpoint Security Group.

## Attribute Reference ##

* `id` - Attribute id set to the Dn of the Endpoint Security Group.
* `annotation` - (Optional) Annotation of object Endpoint Security Group.
* `description` - (Optional) Description of object Endpoint Security Group.
* `name_alias` - (Optional) Name Alias of object Endpoint Security Group.
* `flood_on_encap` - (Optional) Handles L2 Multicast/Broadcast and Link-Layer traffic at EPG level. It represents Control at EPG level and decides if the traffic L2 Multicast/Broadcast and Link Local Layer should be flooded only on ENCAP, or based on bridge-domain settings.
* `match_t` - (Optional) The provider label match criteria.
* `pc_enf_pref` - (Optional) The preferred policy control.
* `pref_gr_memb` - (Optional) Represents parameter used to determine
if EPg is part of a group that does not
a contract for communication.
* `prio` - (Optional) The QoS priority class identifier.
* `annotation` - (Read-Only) Annotation of the object Endpoint Security Group.
* `description` - (Read-Only) Description of the object Endpoint Security Group.
* `name_alias` - (Read-Only) Name Alias of the object Endpoint Security Group.
* `match_t` - (Read-Only) The provider label match criteria.
* `pc_enf_pref` - (Read-Only) The preferred policy control.
* `pref_gr_memb` - (Read-Only) Represents parameter used to determine if EPG is part of a group that does not a contract for communication.
18 changes: 7 additions & 11 deletions legacy-docs/docs/d/endpoint_security_group.html.markdown
Original file line number Diff line number Diff line change
Expand Up @@ -32,18 +32,14 @@ data "aci_endpoint_security_group" "example" {
## Argument Reference ##

* `application_profile_dn` - (Required) Distinguished name of parent Application Profile object.
* `name` - (Required) name of object Endpoint Security Group.
* `name` - (Required) Name of the object Endpoint Security Group.

## Attribute Reference ##

* `id` - Attribute id set to the Dn of the Endpoint Security Group.
* `annotation` - (Optional) Annotation of object Endpoint Security Group.
* `description` - (Optional) Description of object Endpoint Security Group.
* `name_alias` - (Optional) Name Alias of object Endpoint Security Group.
* `flood_on_encap` - (Optional) Handles L2 Multicast/Broadcast and Link-Layer traffic at EPG level. It represents Control at EPG level and decides if the traffic L2 Multicast/Broadcast and Link Local Layer should be flooded only on ENCAP, or based on bridge-domain settings.
* `match_t` - (Optional) The provider label match criteria.
* `pc_enf_pref` - (Optional) The preferred policy control.
* `pref_gr_memb` - (Optional) Represents parameter used to determine
if EPg is part of a group that does not
a contract for communication.
* `prio` - (Optional) The QoS priority class identifier.
* `annotation` - (Read-Only) Annotation of the object Endpoint Security Group.
* `description` - (Read-Only) Description of the object Endpoint Security Group.
* `name_alias` - (Read-Only) Name Alias of the object Endpoint Security Group.
* `match_t` - (Read-Only) The provider label match criteria.
* `pc_enf_pref` - (Read-Only) The preferred policy control.
* `pref_gr_memb` - (Read-Only) Represents parameter used to determine if EPG is part of a group that does not a contract for communication.
Loading