Skip to content

Commit

Permalink
more build_errors_count issues and fix unsafe Node Patch
Browse files Browse the repository at this point in the history
  • Loading branch information
bwJuniper committed Oct 1, 2024
1 parent 0cf8ec5 commit 8f4f6cd
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 8 deletions.
2 changes: 1 addition & 1 deletion apstra/blueprint/blueprint.go
Original file line number Diff line number Diff line change
Expand Up @@ -635,7 +635,7 @@ func (o *Blueprint) SetName(ctx context.Context, bpClient *apstra.TwoStageL3Clos
nodeId = v.Id
}

err = bpClient.PatchNode(ctx, nodeId, &node{Label: o.Name.ValueString()}, nil)
err = bpClient.PatchNodeUnsafe(ctx, nodeId, &node{Label: o.Name.ValueString()}, nil)
if err != nil {
diags.AddError(
fmt.Sprintf(errApiPatchWithTypeAndId, bpClient.Id(), nodeId),
Expand Down
14 changes: 7 additions & 7 deletions apstra/resource_datacenter_blueprint_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -252,7 +252,7 @@ func TestResourceDatacenterBlueprint(t *testing.T) {
resource.TestCheckResourceAttr("apstra_datacenter_blueprint.test", "external_router_count", "0"),
resource.TestCheckResourceAttr("apstra_datacenter_blueprint.test", "has_uncommitted_changes", "true"),
resource.TestCheckResourceAttrWith("apstra_datacenter_blueprint.test", "version", testCheckIntGE1),
resource.TestCheckResourceAttr("apstra_datacenter_blueprint.test", "build_errors_count", "58"),
resource.TestCheckResourceAttrWith("apstra_datacenter_blueprint.test", "build_errors_count", atleast50),
resource.TestCheckResourceAttr("apstra_datacenter_blueprint.test", "build_warnings_count", "0"),

resource.TestCheckResourceAttr("apstra_datacenter_blueprint.test", "anti_affinity_mode", apstra.AntiAffinityModeEnabledStrict.String()),
Expand Down Expand Up @@ -296,7 +296,7 @@ func TestResourceDatacenterBlueprint(t *testing.T) {
resource.TestCheckResourceAttr("apstra_datacenter_blueprint.test", "external_router_count", "0"),
resource.TestCheckResourceAttr("apstra_datacenter_blueprint.test", "has_uncommitted_changes", "true"),
resource.TestCheckResourceAttrWith("apstra_datacenter_blueprint.test", "version", testCheckIntGE1),
resource.TestCheckResourceAttr("apstra_datacenter_blueprint.test", "build_errors_count", "58"),
resource.TestCheckResourceAttrWith("apstra_datacenter_blueprint.test", "build_errors_count", atleast50),
resource.TestCheckResourceAttr("apstra_datacenter_blueprint.test", "build_warnings_count", "0"),

resource.TestCheckResourceAttr("apstra_datacenter_blueprint.test", "anti_affinity_mode", apstra.AntiAffinityModeEnabledStrict.String()),
Expand Down Expand Up @@ -479,7 +479,7 @@ func TestResourceDatacenterBlueprint(t *testing.T) {
resource.TestCheckResourceAttr("apstra_datacenter_blueprint.test", "external_router_count", "0"),
resource.TestCheckResourceAttr("apstra_datacenter_blueprint.test", "has_uncommitted_changes", "true"),
resource.TestCheckResourceAttrWith("apstra_datacenter_blueprint.test", "version", testCheckIntGE1),
resource.TestCheckResourceAttr("apstra_datacenter_blueprint.test", "build_errors_count", "58"),
resource.TestCheckResourceAttrWith("apstra_datacenter_blueprint.test", "build_errors_count", atleast50),
resource.TestCheckResourceAttr("apstra_datacenter_blueprint.test", "build_warnings_count", "0"),

resource.TestCheckResourceAttr("apstra_datacenter_blueprint.test", "anti_affinity_mode", apstra.AntiAffinityModeEnabledStrict.String()),
Expand Down Expand Up @@ -597,7 +597,7 @@ func TestResourceDatacenterBlueprint(t *testing.T) {
resource.TestCheckResourceAttr("apstra_datacenter_blueprint.test", "external_router_count", "0"),
resource.TestCheckResourceAttr("apstra_datacenter_blueprint.test", "has_uncommitted_changes", "true"),
resource.TestCheckResourceAttrWith("apstra_datacenter_blueprint.test", "version", testCheckIntGE1),
resource.TestCheckResourceAttr("apstra_datacenter_blueprint.test", "build_errors_count", "58"),
resource.TestCheckResourceAttrWith("apstra_datacenter_blueprint.test", "build_errors_count", atleast50),
resource.TestCheckResourceAttr("apstra_datacenter_blueprint.test", "build_warnings_count", "0"),

resource.TestCheckResourceAttr("apstra_datacenter_blueprint.test", "anti_affinity_mode", apstra.AntiAffinityModeEnabledStrict.String()),
Expand Down Expand Up @@ -641,7 +641,7 @@ func TestResourceDatacenterBlueprint(t *testing.T) {
resource.TestCheckResourceAttr("apstra_datacenter_blueprint.test", "external_router_count", "0"),
resource.TestCheckResourceAttr("apstra_datacenter_blueprint.test", "has_uncommitted_changes", "true"),
resource.TestCheckResourceAttrWith("apstra_datacenter_blueprint.test", "version", testCheckIntGE1),
resource.TestCheckResourceAttr("apstra_datacenter_blueprint.test", "build_errors_count", "58"),
resource.TestCheckResourceAttrWith("apstra_datacenter_blueprint.test", "build_errors_count", atleast50),
resource.TestCheckResourceAttr("apstra_datacenter_blueprint.test", "build_warnings_count", "0"),

resource.TestCheckResourceAttr("apstra_datacenter_blueprint.test", "anti_affinity_mode", apstra.AntiAffinityModeEnabledStrict.String()),
Expand Down Expand Up @@ -759,7 +759,7 @@ func TestResourceDatacenterBlueprint(t *testing.T) {
resource.TestCheckResourceAttr("apstra_datacenter_blueprint.test", "external_router_count", "0"),
resource.TestCheckResourceAttr("apstra_datacenter_blueprint.test", "has_uncommitted_changes", "true"),
resource.TestCheckResourceAttrWith("apstra_datacenter_blueprint.test", "version", testCheckIntGE1),
resource.TestCheckResourceAttr("apstra_datacenter_blueprint.test", "build_errors_count", "58"),
resource.TestCheckResourceAttrWith("apstra_datacenter_blueprint.test", "build_errors_count", atleast50),
resource.TestCheckResourceAttr("apstra_datacenter_blueprint.test", "build_warnings_count", "0"),

resource.TestCheckResourceAttr("apstra_datacenter_blueprint.test", "anti_affinity_mode", apstra.AntiAffinityModeEnabledStrict.String()),
Expand Down Expand Up @@ -825,7 +825,7 @@ func TestResourceDatacenterBlueprint(t *testing.T) {
resource.TestCheckResourceAttr("apstra_datacenter_blueprint.test", "external_router_count", "0"),
resource.TestCheckResourceAttr("apstra_datacenter_blueprint.test", "has_uncommitted_changes", "true"),
resource.TestCheckResourceAttrWith("apstra_datacenter_blueprint.test", "version", testCheckIntGE1),
resource.TestCheckResourceAttr("apstra_datacenter_blueprint.test", "build_errors_count", "58"),
resource.TestCheckResourceAttrWith("apstra_datacenter_blueprint.test", "build_errors_count", atleast50),
resource.TestCheckResourceAttr("apstra_datacenter_blueprint.test", "build_warnings_count", "0"),

resource.TestCheckResourceAttr("apstra_datacenter_blueprint.test", "anti_affinity_mode", apstra.AntiAffinityModeEnabledStrict.String()),
Expand Down

0 comments on commit 8f4f6cd

Please sign in to comment.