-
Notifications
You must be signed in to change notification settings - Fork 30
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
Oracle allow explicitly specifying vcn for subnet selection #315
Conversation
fb1e3ee
to
c603b58
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM, but I need to do some testing for the functionality.
pycloudlib/oci/utils.py
Outdated
@@ -47,13 +48,27 @@ def get_subnet_id( | |||
network_client: Instance of VirtualNetworkClient. | |||
compartment_id: Compartment where the subnet has to belong | |||
availability_domain: Domain to look for subnet id in. | |||
target_subnet_name: Name of the subnet to look for. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Is this line needed?
c603b58
to
692bbbe
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Tested it with CTF and it works. LGTM.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thanks! Apart from the typing fix, LGTM.
Oracle's pycloudlib implementation currently uses the most recently created VCN (Virtual Cloud Network) in the given compartment for new VM instances being created. Problems can therefore arise if a newly created VCN uses a subnet with different rules than the previously used VCN's subnet. Now, instead of relying on just blindly choosing the most recently created VCN, pycloudlib supports specifying a vcn_name value which it will use to find a VCN that has a name that exactly matches the given vcn_name.
692bbbe
to
461cbee
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM, thanks!
Jira ticket for context: https://warthogs.atlassian.net/browse/CPC-2908 |
feat(oracle): ability to specify vcn by name for subnet selection
Oracle's pycloudlib implementation currently uses the most recently created VCN (Virtual Cloud Network) in the given compartment for new VM instances being created. Problems can therefore arise if a newly created VCN uses a subnet with different rules than the previously used VCN's subnet.
Now, instead of relying on just blindly choosing the most recently created VCN, pycloudlib supports specifying a vcn_name value which it will use to find a VCN that has a name that exactly matches the given vcn_name.