feat(oci): add instance property to get all ip addresses#492
Merged
uhryniuk merged 4 commits intocanonical:mainfrom Oct 30, 2025
Merged
feat(oci): add instance property to get all ip addresses#492uhryniuk merged 4 commits intocanonical:mainfrom
uhryniuk merged 4 commits intocanonical:mainfrom
Conversation
c4ee28f to
07d7eb7
Compare
Contributor
Author
|
Additionally added None check for for the azure diagnostics uri. The underlying azure library had changed their return type causing the linter error. |
2325768 to
24c54b0
Compare
53d061e to
8976edf
Compare
Gisaldjo
requested changes
Oct 29, 2025
Contributor
Gisaldjo
left a comment
There was a problem hiding this comment.
Looks good! Just a couple of small changes and some clarifying questions for my own understanding
| if self._ip is None: | ||
| self._ip = primary_vnic.ipv6_addresses[0] | ||
| self._log.info("Using ipv6 address: %s", self._ip) | ||
| self.ips.extend(primary_vnic.ipv6_addresses) |
Contributor
There was a problem hiding this comment.
Shouldn't it be self._ips.extend()?
Contributor
Author
There was a problem hiding this comment.
it should! changing 🫡
8976edf to
641541b
Compare
Gisaldjo
approved these changes
Oct 29, 2025
rthill91
approved these changes
Oct 30, 2025
641541b to
01c3443
Compare
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Description
An OCI instance is able to have multiple public IP addresses, for both IPv4 and IPv6, however no functionality exists to list all available public IP addresses. These changes include
instance.ipswhich provides a list of all publicly available IP addresses.Additionally, pycloudlib did not support allocating both IPv4 and IPv6 IPs on dual stack subnets. Changes were included to ensure that both IPs would be allocated when a subnet with both an v4 and v6 CIDR block was provided.
Additional Context and Relevant Issues
If an instance is launched with IPv6 only, the address is assigned to the
instance,ipand same situation with IPv4 only. However, with dual stack subnets, the IPv4 address is prioritized forinstance.ipbut without these commits, there is not clean way to access the other IP addresses.Test Steps
Existing unit tests were updated to reflect the additional functionality.