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

Add hgw-mac key in metadata while preparing online and offline message #507

Open
wants to merge 2 commits into
base: main
Choose a base branch
from

Conversation

ChaitanyaSingla
Copy link

No description provided.

Copy link

codecov bot commented Dec 13, 2024

Codecov Report

All modified and coverable lines are covered by tests ✅

Project coverage is 58.62%. Comparing base (8418f50) to head (6dc96f0).
Report is 3 commits behind head on main.

Additional details and impacted files
@@            Coverage Diff             @@
##             main     #507      +/-   ##
==========================================
+ Coverage   58.60%   58.62%   +0.02%     
==========================================
  Files          18       18              
  Lines        1872     1873       +1     
==========================================
+ Hits         1097     1098       +1     
  Misses        733      733              
  Partials       42       42              
Flag Coverage Δ
unittests 58.62% <100.00%> (+0.02%) ⬆️

Flags with carried forward coverage won't be shown. Click here to find out more.

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

deviceStatus.go Outdated
@@ -36,6 +37,7 @@ func statusMetadata(d device.Interface) map[string]string {
metadata["/compliance"] = convey.MissingFields.String()
}

metadata["hw-mac"] = strings.TrimPrefix(string(d.ID()), "mac:")
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Device identifiers don't have to be a MAC address. Would it be ok to change this to:

metadata["/hw-deviceid"] = d.ID()

This will result in the metadata looking like:
/hw-deviceid = mac:112233445566 or uuid:1edfb5ba-acb8-4e33-9793-a032d1e352ed depending on the way the CPE is named?

For users that assign a uuid for the combination of a CPE + account this will work as well.

Copy link
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@schmidtw I have updated the code.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants