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 tags field in Device model #178

Merged
merged 3 commits into from
Aug 25, 2022
Merged

Add tags field in Device model #178

merged 3 commits into from
Aug 25, 2022

Conversation

Maffsie
Copy link
Contributor

@Maffsie Maffsie commented Aug 25, 2022

Proposed Changes

This PR updates the Device model to expose the ACL tags. The field is not listed in the official API documentation (or wasn't when I looked yesterday) but it is returned by the API, and is a useful field to have.

Related Issues

None - just directly fixing when I noticed the issue

Tailscale's API exposes the ACL tags of devices. This commit prevents the tags from being discarded.
Fixes an issue where the validation of a Device would fail if the tags list is not present (reproducible if the "hello" external tailscale service is joined to your tailnet)
I forgot that the Optional type can contain a typed type inside it. The field is now actually optional.
@frenck frenck added the new-feature New features or options. label Aug 25, 2022
@codecov-commenter
Copy link

Codecov Report

Merging #178 (1aa5659) into main (f3db390) will increase coverage by 0.07%.
The diff coverage is 100.00%.

@@            Coverage Diff             @@
##             main     #178      +/-   ##
==========================================
+ Coverage   91.66%   91.74%   +0.07%     
==========================================
  Files           4        4              
  Lines         108      109       +1     
  Branches       15       15              
==========================================
+ Hits           99      100       +1     
  Misses          8        8              
  Partials        1        1              
Impacted Files Coverage Δ
src/tailscale/models.py 92.15% <100.00%> (+0.15%) ⬆️

Help us with your feedback. Take ten seconds to tell us how you rate us. Have a feature suggestion? Share it here.

Copy link
Owner

@frenck frenck left a comment

Choose a reason for hiding this comment

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

Thanks, @Maffsie 👍

@frenck frenck merged commit 6220755 into frenck:main Aug 25, 2022
@github-actions github-actions bot locked and limited conversation to collaborators Aug 27, 2022
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
new-feature New features or options.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

3 participants