Skip to content

Commit

Permalink
fix(foritgate,dnac): make MAC always uppercase
Browse files Browse the repository at this point in the history
bl4ko committed Jan 27, 2025
1 parent 1c133f9 commit f650136
Showing 3 changed files with 3 additions and 3 deletions.
2 changes: 1 addition & 1 deletion internal/source/dnac/dnac_sync.go
Original file line number Diff line number Diff line change
@@ -634,7 +634,7 @@ func (ds *DnacSource) syncMissingDevicePrimaryIPs(nbi *inventory.NetboxInventory
Name: "mgmt",
Type: &objects.OtherInterfaceType,
Status: true,
MAC: device.MacAddress,
MAC: strings.ToUpper(device.MacAddress),

Check warning on line 637 in internal/source/dnac/dnac_sync.go

Codecov / codecov/patch

internal/source/dnac/dnac_sync.go#L637

Added line #L637 was not covered by tests
}
nbiIface, err := nbi.AddInterface(ds.Ctx, managementInterfaceStruct)
if err != nil {
2 changes: 1 addition & 1 deletion internal/source/fortigate/fortigate_sync.go
Original file line number Diff line number Diff line change
@@ -149,7 +149,7 @@ func (fs *FortigateSource) syncInterfaces(nbi *inventory.NetboxInventory) error
Type: &objects.OtherInterfaceType,
Name: ifaceName,
MTU: interfaceMTU,
MAC: interfaceMAC,
MAC: strings.ToUpper(interfaceMAC),

Check warning on line 152 in internal/source/fortigate/fortigate_sync.go

Codecov / codecov/patch

internal/source/fortigate/fortigate_sync.go#L152

Added line #L152 was not covered by tests
Status: interfaceStatus,

Vdcs: vdcs,
2 changes: 1 addition & 1 deletion internal/source/vmware/vmware_sync.go
Original file line number Diff line number Diff line change
@@ -25,7 +25,7 @@ func (vc *VmwareSource) syncTags(nbi *inventory.NetboxInventory) error {
Name: tag.Name,
Slug: utils.Slugify(tag.Name),
Color: constants.ColorGreen,
Description: fmt.Sprintf("Tag synced from vmware. %s", tag.Description),
Description: fmt.Sprintf("Tag synced from vmware:%s", tag.Description),
})
if err != nil {
return fmt.Errorf("add tag %+v: %s", tag, err)

0 comments on commit f650136

Please sign in to comment.