Skip to content

Add documentation for IPv6 address generation mode & privacy extensions #2670

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

Open
wants to merge 1 commit into
base: master
Choose a base branch
from

Conversation

davidrapan
Copy link

@davidrapan davidrapan commented May 16, 2025

Proposed change

Add documentation for newly added options to modify address generation mode and privacy extensions of IPv6.

Type of change

  • Document existing features within Home Assistant
  • Document new or changing features for which there is an existing pull request elsewhere
  • Spelling or grammatical corrections, or rewording for improved clarity
  • Changes to the backend of this documentation
  • Remove stale or deprecated documentation

Checklist

  • I have read and followed the documentation guidelines.
  • I have verified that my changes render correctly in the documentation.

Additional information

Summary by CodeRabbit

  • Documentation
    • Improved clarity and separation of IPv4 and IPv6 configuration options in network interface API documentation.
    • Added detailed descriptions for IPv6 configuration fields.
    • Made minor formatting and whitespace adjustments for better readability across several sections, including network, wifi, vlan, and backup documentation.
    • Reformatted payload tables for improved alignment.

Copy link
Contributor

coderabbitai bot commented May 16, 2025

Warning

Rate limit exceeded

@davidrapan has exceeded the limit for the number of commits or files that can be reviewed per hour. Please wait 26 minutes and 3 seconds before requesting another review.

⌛ How to resolve this issue?

After the wait time has elapsed, a review can be triggered using the @coderabbitai review command as a PR comment. Alternatively, push new commits to this PR.

We recommend that you space out your commits to avoid hitting the rate limit.

🚦 How do rate limits work?

CodeRabbit enforces hourly rate limits for each developer per organization.

Our paid plans have higher rate limits than the trial, open-source and free plans. In all cases, we re-allow further reviews after a brief timeout.

Please see our FAQ for further information.

📥 Commits

Reviewing files that changed from the base of the PR and between 22770d0 and efce09b.

📒 Files selected for processing (2)
  • docs/api/supervisor/endpoints.md (5 hunks)
  • docs/api/supervisor/models.md (2 hunks)
📝 Walkthrough

Walkthrough

The documentation for supervisor API endpoints and models was updated to clarify and expand the configuration options for IPv4 and IPv6 network interfaces. Separate sections for IPv4 and IPv6 were introduced, with detailed keys and descriptions for each. Minor formatting and whitespace adjustments were also made throughout the documentation.

Changes

File(s) Change Summary
docs/api/supervisor/endpoints.md Updated /network/interface/<interface>/update endpoint docs to separate IPv4 and IPv6 options, added detailed IPv6 section, clarified method keys, and made minor formatting and whitespace adjustments. Also reformatted /os/datadisk/move payload table and fixed whitespace in /network/interface/<interface>/accesspoints endpoint.
docs/api/supervisor/models.md Improved clarity of "Network interface" section, renamed "IP configuration" to "IPv4 configuration", added detailed "IPv6 configuration" subsection, and made minor whitespace adjustments in various sections including "Backup".

Sequence Diagram(s)

sequenceDiagram
    participant Client
    participant Supervisor API

    Client->>Supervisor API: PATCH /network/interface/<interface>/update (with IPv4 and/or IPv6 config)
    Supervisor API-->>Client: Response with updated interface configuration
Loading
sequenceDiagram
    participant Client
    participant Supervisor API

    Client->>Supervisor API: GET /network/interface/<interface>
    Supervisor API-->>Client: Response with interface details (separate IPv4 and IPv6 configuration sections)
Loading

Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.

❤️ Share
🪧 Tips

Chat

There are 3 ways to chat with CodeRabbit:

  • Review comments: Directly reply to a review comment made by CodeRabbit. Example:
    • I pushed a fix in commit <commit_id>, please review it.
    • Explain this complex logic.
    • Open a follow-up GitHub issue for this discussion.
  • Files and specific lines of code (under the "Files changed" tab): Tag @coderabbitai in a new review comment at the desired location with your query. Examples:
    • @coderabbitai explain this code block.
    • @coderabbitai modularize this function.
  • PR comments: Tag @coderabbitai in a new PR comment to ask questions about the PR branch. For the best results, please provide a very specific query, as very limited context is provided in this mode. Examples:
    • @coderabbitai gather interesting stats about this repository and render them as a table. Additionally, render a pie chart showing the language distribution in the codebase.
    • @coderabbitai read src/utils.ts and explain its main purpose.
    • @coderabbitai read the files in the src/scheduler package and generate a class diagram using mermaid and a README in the markdown format.
    • @coderabbitai help me debug CodeRabbit configuration file.

Support

Need help? Create a ticket on our support page for assistance with any issues or questions.

Note: Be mindful of the bot's finite context window. It's strongly recommended to break down tasks such as reading entire modules into smaller chunks. For a focused discussion, use review comments to chat about specific files and their changes, instead of using the PR comments.

CodeRabbit Commands (Invoked using PR comments)

  • @coderabbitai pause to pause the reviews on a PR.
  • @coderabbitai resume to resume the paused reviews.
  • @coderabbitai review to trigger an incremental review. This is useful when automatic reviews are disabled for the repository.
  • @coderabbitai full review to do a full review from scratch and review all the files again.
  • @coderabbitai summary to regenerate the summary of the PR.
  • @coderabbitai generate docstrings to generate docstrings for this PR.
  • @coderabbitai generate sequence diagram to generate a sequence diagram of the changes in this PR.
  • @coderabbitai resolve resolve all the CodeRabbit review comments.
  • @coderabbitai configuration to show the current CodeRabbit configuration for the repository.
  • @coderabbitai help to get help.

Other keywords and placeholders

  • Add @coderabbitai ignore anywhere in the PR description to prevent this PR from being reviewed.
  • Add @coderabbitai summary to generate the high-level summary at a specific location in the PR description.
  • Add @coderabbitai or @coderabbitai title anywhere in the PR title to generate the title automatically.

CodeRabbit Configuration File (.coderabbit.yaml)

  • You can programmatically configure CodeRabbit by adding a .coderabbit.yaml file to the root of your repository.
  • Please see the configuration documentation for more information.
  • If your editor has YAML language server enabled, you can add the path at the top of this file to enable auto-completion and validation: # yaml-language-server: $schema=https://coderabbit.ai/integrations/schema.v2.json

Documentation and Community

  • Visit our Documentation for detailed information on how to use CodeRabbit.
  • Join our Discord Community to get help, request features, and share feedback.
  • Follow us on X/Twitter for updates and announcements.

Copy link
Contributor

@coderabbitai coderabbitai bot left a comment

Choose a reason for hiding this comment

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

Actionable comments posted: 0

🧹 Nitpick comments (4)
docs/api/supervisor/models.md (2)

117-127: Validate IPv6 configuration details and grammar
The new "IPv6 configuration" block correctly covers address generation and privacy extension options. Two tweaks recommended:

  1. Grammar: use "in an X.X.X.X/XX format" instead of "in a X.X.X.X/XX format".
  2. Consistency: confirm whether method: auto also includes Router Advertisements or if RA should be listed explicitly.

Please check the API spec and update the method description to accurately reflect all supported modes.

🧰 Tools
🪛 LanguageTool

[misspelling] ~124-~124: Use “an” instead of ‘a’ if the following word starts with a vowel sound, e.g. ‘an article’, ‘an hour’.
Context: ...list with IP address and the netmask in a X.X.X.X/XX format. | ...

(EN_A_VS_AN)


185-192: Unify type naming in Backup model
The content field uses dictionary while most models use dict. Standardize to dict for consistency across the docs.

docs/api/supervisor/endpoints.md (2)

2386-2386: Clarify enabled field description
The current phrase "got removed with disabled" is confusing. Consider rewording to something like:

-| enabled | bool   | True     | Enable/Disable an ethernet interface / VLAN got removed with disabled  |
+| enabled | bool   | True     | Enable or disable the interface. For VLANs, disabling removes the VLAN. |

2401-2410: Approve addition of IPv6 endpoint payload docs
The new IPv6 payload section correctly documents addr-gen-mode and ip6-privacy.

For extra clarity, you might refine the address description to:

A list of strings with the IPv6 address and prefix in an X:X::/XX format
and adjust article usage to "an X:X::/XX format".

📜 Review details

Configuration used: CodeRabbit UI
Review profile: CHILL
Plan: Pro
Cache: Disabled due to data retention organization setting
Knowledge Base: Disabled due to data retention organization setting

📥 Commits

Reviewing files that changed from the base of the PR and between c3019bd and d088240.

📒 Files selected for processing (2)
  • docs/api/supervisor/endpoints.md (3 hunks)
  • docs/api/supervisor/models.md (3 hunks)
🧰 Additional context used
🪛 LanguageTool
docs/api/supervisor/models.md

[misspelling] ~124-~124: Use “an” instead of ‘a’ if the following word starts with a vowel sound, e.g. ‘an article’, ‘an hour’.
Context: ...list with IP address and the netmask in a X.X.X.X/XX format. | ...

(EN_A_VS_AN)

🔇 Additional comments (3)
docs/api/supervisor/models.md (2)

103-107: Approve addition of IPv6 field in Network interface model
Introducing the ipv6 struct alongside ipv4, wifi, and vlan improves completeness for dual-stack support.


108-112: Section rename improves clarity
Renaming "IP configuration" to "IPv4 configuration" explicitly identifies the IP version, which aids reader comprehension.

docs/api/supervisor/endpoints.md (1)

2395-2395: Ensure IPv4 method description consistency
The IPv4 method entry calls out DHCP only, yet the model docs treat auto generically. Verify if "auto" here should strictly refer to DHCP or include RA, and align both docs accordingly.

@davidrapan davidrapan force-pushed the dev_ipv6_addr-gen-mode branch from d088240 to 8e8a489 Compare May 16, 2025 03:07
Copy link
Contributor

@coderabbitai coderabbitai bot left a comment

Choose a reason for hiding this comment

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

Actionable comments posted: 1

🧹 Nitpick comments (2)
docs/api/supervisor/models.md (2)

103-106: Improve navigability by linking to configuration subsections

Linking the ipv4, ipv6, wifi, and vlan fields to their corresponding sections will help readers jump directly to the detailed tables. For consistency, adjust casing to VLAN (uppercase) and consider Wi-Fi for clarity:

- | ipv4        | struct or null  | An IP config struct with IPv4 connection details.                    |
+ | ipv4        | struct or null  | An [IPv4 configuration](#ipv4-configuration) struct or null.         |

- | ipv6        | struct or null  | An IP config struct with IPv6 connection details.                    |
+ | ipv6        | struct or null  | An [IPv6 configuration](#ipv6-configuration) struct or null.         |

- | wifi        | struct or null  | A Wifi config struct with wireless connection details.               |
+ | wifi        | struct or null  | A [Wi-Fi configuration](#wifi-configuration) struct or null.         |

- | vlan        | struct or null  | A Vlan config struct with details about the vlan.                    |
+ | vlan        | struct or null  | A [VLAN configuration](#vlan-configuration) struct or null.          |

185-191: Unify type naming and link to content details

Use dict instead of dictionary for the content type to match other sections, and link to the "Backup -> content" subsection for clarity:

- | content | dictionary | A dictionary describing the content of the backup                    |
+ | content | dict       | Details of the backup content. See [Backup -> content](#backup--content).        |
📜 Review details

Configuration used: CodeRabbit UI
Review profile: CHILL
Plan: Pro
Cache: Disabled due to data retention organization setting
Knowledge Base: Disabled due to data retention organization setting

📥 Commits

Reviewing files that changed from the base of the PR and between d088240 and 8e8a489.

📒 Files selected for processing (2)
  • docs/api/supervisor/endpoints.md (3 hunks)
  • docs/api/supervisor/models.md (3 hunks)
🚧 Files skipped from review as they are similar to previous changes (1)
  • docs/api/supervisor/endpoints.md
🧰 Additional context used
🪛 LanguageTool
docs/api/supervisor/models.md

[misspelling] ~124-~124: Use “an” instead of ‘a’ if the following word starts with a vowel sound, e.g. ‘an article’, ‘an hour’.
Context: ...list with IP address and the netmask in a X.X.X.X/XX format. | ...

(EN_A_VS_AN)

⏰ Context from checks skipped due to timeout of 90000ms (3)
  • GitHub Check: Redirect rules - developers-home-assistant
  • GitHub Check: Header rules - developers-home-assistant
  • GitHub Check: Pages changed - developers-home-assistant
🔇 Additional comments (1)
docs/api/supervisor/models.md (1)

108-108: Approve: Section renamed to IPv4 configuration

Renaming the "IP configuration" subsection to "IPv4 configuration" clarifies the IP version being configured. This improves the documentation structure.

@davidrapan davidrapan force-pushed the dev_ipv6_addr-gen-mode branch from 8e8a489 to d027e10 Compare May 16, 2025 03:15
@davidrapan davidrapan changed the title Add documentation for IPv6 Address Generation mode & privacy extensions Add documentation for IPv6 address generation mode & privacy extensions May 20, 2025
@davidrapan davidrapan marked this pull request as draft May 20, 2025 14:38
@davidrapan davidrapan force-pushed the dev_ipv6_addr-gen-mode branch from d027e10 to c1e5aa3 Compare May 20, 2025 14:44
@davidrapan davidrapan marked this pull request as ready for review May 20, 2025 14:44
@davidrapan davidrapan force-pushed the dev_ipv6_addr-gen-mode branch 4 times, most recently from e1eac62 to 22770d0 Compare May 20, 2025 14:57
@davidrapan davidrapan marked this pull request as draft May 20, 2025 18:24
@davidrapan davidrapan marked this pull request as ready for review May 20, 2025 18:25
Copy link
Contributor

@coderabbitai coderabbitai bot left a comment

Choose a reason for hiding this comment

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

Actionable comments posted: 1

🧹 Nitpick comments (2)
docs/api/supervisor/models.md (2)

96-107: Refine interface descriptions for consistency and correctness

The interface table mixes uppercase boolean literals and lacks proper article/notation for examples. Update as follows:

-| interface   | string  | The interface name i.e eth0.                                                                  |
+| interface   | string  | The interface name, e.g., `eth0`.                                                             |
-| enabled     | boolean | Return True if the interface is enabled.                                                      |
+| enabled     | boolean | `true` if the interface is enabled.                                                           |
-| connected   | boolean | Return True if the interface is connected to the network.                                     |
+| connected   | boolean | `true` if the interface is connected to the network.                                          |
-| primary     | boolean | `true` if it's the primary network interface.                                                 |
+| primary     | boolean | `true` if the interface is the primary network interface.                                     |
🧰 Tools
🪛 LanguageTool

[uncategorized] ~98-~98: The abbreviation “i.e.” (= that is) requires two periods.
Context: ...erface | string | The interface name i.e eth0. ...

(I_E)


183-191: Unify type naming for the backup content field

Use dict instead of dictionary to match other model tables:

-| content | dictionary | Details of the backup content. See [Backup -> content](#backup---content) |
+| content | dict       | Details of the backup content. See [Backup -> content](#backup---content) |
📜 Review details

Configuration used: CodeRabbit UI
Review profile: CHILL
Plan: Pro
Cache: Disabled due to data retention organization setting
Knowledge Base: Disabled due to data retention organization setting

📥 Commits

Reviewing files that changed from the base of the PR and between d027e10 and 22770d0.

📒 Files selected for processing (2)
  • docs/api/supervisor/endpoints.md (4 hunks)
  • docs/api/supervisor/models.md (2 hunks)
🚧 Files skipped from review as they are similar to previous changes (1)
  • docs/api/supervisor/endpoints.md
🧰 Additional context used
🪛 LanguageTool
docs/api/supervisor/models.md

[uncategorized] ~98-~98: The abbreviation “i.e.” (= that is) requires two periods.
Context: ...erface | string | The interface name i.e eth0. ...

(I_E)

Signed-off-by: David Rapan <david@rapan.cz>
@davidrapan davidrapan force-pushed the dev_ipv6_addr-gen-mode branch from 22770d0 to efce09b Compare May 20, 2025 19:07
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.

1 participant
pFad - Phonifier reborn

Pfad - The Proxy pFad of © 2024 Garber Painting. All rights reserved.

Note: This service is not intended for secure transactions such as banking, social media, email, or purchasing. Use at your own risk. We assume no liability whatsoever for broken pages.


Alternative Proxies:

Alternative Proxy

pFad Proxy

pFad v3 Proxy

pFad v4 Proxy