Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion VERSION
Original file line number Diff line number Diff line change
@@ -1 +1 @@
1!10.14.0
1!10.14.1
14 changes: 8 additions & 6 deletions pycloudlib/oci/cloud.py
Original file line number Diff line number Diff line change
Expand Up @@ -313,12 +313,14 @@ def launch(
subnet = self.network_client.get_subnet(subnet_id).data
vnic_kwargs = {}

# When no IPv4 CIDR is present, the value is assigned to '<null>' str instead of None.
if "null" not in subnet.cidr_block:
vnic_kwargs["assign_public_ip"] = True

if subnet.ipv6_cidr_block is not None:
vnic_kwargs["assign_ipv6_ip"] = True
# Only assign public IP if the subnet allows it
if not subnet.prohibit_public_ip_on_vnic:
# When no IPv4 CIDR is present, the value is assigned to '<null>' str instead of None.
if "null" not in subnet.cidr_block:
vnic_kwargs["assign_public_ip"] = True

if subnet.ipv6_cidr_block is not None:
vnic_kwargs["assign_ipv6_ip"] = True

default_metadata = {
"ssh_authorized_keys": self.key_pair.public_key_content,
Expand Down