Skip to content

Commit

Permalink
Merge pull request #605 from Juniper/update-anti-affinity-docstring
Browse files Browse the repository at this point in the history
Update anti-affinity doc string
  • Loading branch information
chrismarget-j committed Mar 5, 2024
2 parents bec13e5 + 34f68dd commit d6faec8
Show file tree
Hide file tree
Showing 2 changed files with 13 additions and 12 deletions.
19 changes: 10 additions & 9 deletions apstra/blueprint/blueprint.go
Original file line number Diff line number Diff line change
Expand Up @@ -389,16 +389,17 @@ func (o Blueprint) ResourceAttributes() map[string]resourceSchema.Attribute {
"anti_affinity_mode": resourceSchema.StringAttribute{
Computed: true,
Optional: true,
MarkdownDescription: "The anti-affinity policy has three modes:\n" +
"\t* `Disabled` (default) - ports selection is based on assigned interface maps and interface names " +
"(provided or auto-assigned). Port breakouts could terminate on the same physical ports.\n" +
"\t* `loose` - controls interface names that were not defined by the user. Does not control or override " +
"user-defined cabling. (If you haven't explicitly assigned any interface names, loose and strict are " +
"effectively the same policy.)\n" +
"\t* `strict` - completely controls port distribution and could override user-defined assignments. " +
"When you enable the strict policy, a statement appears at the top of the cabling map " +
"(Staged/Active > Physical > Links and Staged/Active > Physical > Topology Selection) stating that the " +
MarkdownDescription: fmt.Sprintf("The anti-affinity policy has three modes:\n"+
"\t* `%s` (default) - ports selection is based on assigned interface maps and interface names "+
"(provided or auto-assigned). Port breakouts could terminate on the same physical ports.\n"+
"\t* `%s` - controls interface names that were not defined by the user. Does not control or override "+
"user-defined cabling. (If you haven't explicitly assigned any interface names, loose and strict are "+
"effectively the same policy.)\n"+
"\t* `%s` - completely controls port distribution and could override user-defined assignments. "+
"When you enable the strict policy, a statement appears at the top of the cabling map "+
"(Staged/Active > Physical > Links and Staged/Active > Physical > Topology Selection) stating that the "+
"anti-affinity policy is enabled.",
apstra.AntiAffinityModeDisabled, apstra.AntiAffinityModeEnabledLoose, apstra.AntiAffinityModeEnabledStrict),
Validators: []validator.String{
stringvalidator.OneOf(
apstra.AntiAffinityModeDisabled.String(),
Expand Down
6 changes: 3 additions & 3 deletions docs/resources/datacenter_blueprint.md
Original file line number Diff line number Diff line change
Expand Up @@ -102,9 +102,9 @@ resource "apstra_blueprint_deployment" "deploy" {
### Optional

- `anti_affinity_mode` (String) The anti-affinity policy has three modes:
* `Disabled` (default) - ports selection is based on assigned interface maps and interface names (provided or auto-assigned). Port breakouts could terminate on the same physical ports.
* `loose` - controls interface names that were not defined by the user. Does not control or override user-defined cabling. (If you haven't explicitly assigned any interface names, loose and strict are effectively the same policy.)
* `strict` - completely controls port distribution and could override user-defined assignments. When you enable the strict policy, a statement appears at the top of the cabling map (Staged/Active > Physical > Links and Staged/Active > Physical > Topology Selection) stating that the anti-affinity policy is enabled.
* `disabled` (default) - ports selection is based on assigned interface maps and interface names (provided or auto-assigned). Port breakouts could terminate on the same physical ports.
* `enabled_loose` - controls interface names that were not defined by the user. Does not control or override user-defined cabling. (If you haven't explicitly assigned any interface names, loose and strict are effectively the same policy.)
* `enabled_strict` - completely controls port distribution and could override user-defined assignments. When you enable the strict policy, a statement appears at the top of the cabling map (Staged/Active > Physical > Links and Staged/Active > Physical > Topology Selection) stating that the anti-affinity policy is enabled.
- `anti_affinity_policy` (Attributes) When designing high availability (HA) systems, you want parallel links between two devices to terminate on different physical ports, thus avoiding transceiver failures from impacting both links on a device. Depending on the number of interfaces on a system, manually modifying these links could be time-consuming. With the anti-affinity policy you can apply certain constraints to the cabling map to control automatic port assignments. (see [below for nested schema](#nestedatt--anti_affinity_policy))
- `default_ip_links_to_generic_mtu` (Number) Default L3 MTU for IP links to generic systems. A null or empty value implies AOS will not render explicit MTU value and system defaults will be used. Should be an even number between 1280 and 9216. Requires Apstra >=4.2.0
- `default_svi_l3_mtu` (Number) Default L3 MTU for SVI interfaces. Should be an even number between 1280 and 9216. Requires Apstra >=4.2.0.
Expand Down

0 comments on commit d6faec8

Please sign in to comment.