You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
// Based on Omicron validation in nexus/db-queries/src/db/datastore/external_ip.rs:544-661
559
560
constipVersion=pool.ip_version
560
561
if(ipVersion==='v4'&&!hasIpv4Nic){
561
-
throwjson(
562
-
{
563
-
error_code: 'InvalidRequest',
564
-
message: `The ephemeral external IP is an IPv4 address, but the instance with ID ${body.name} does not have a primary network interface with a VPC-private IPv4 address. Add a VPC-private IPv4 address to the interface, or attach a different IP address`,
565
-
},
566
-
{status: 400}
562
+
throwinvalidRequest(
563
+
`The ephemeral external IP is an IPv4 address, but the instance with ID ${body.name} does not have a primary network interface with a VPC-private IPv4 address. Add a VPC-private IPv4 address to the interface, or attach a different IP address`
567
564
)
568
565
}
569
566
if(ipVersion==='v6'&&!hasIpv6Nic){
570
-
throwjson(
571
-
{
572
-
error_code: 'InvalidRequest',
573
-
message: `The ephemeral external IP is an IPv6 address, but the instance with ID ${body.name} does not have a primary network interface with a VPC-private IPv6 address. Add a VPC-private IPv6 address to the interface, or attach a different IP address`,
574
-
},
575
-
{status: 400}
567
+
throwinvalidRequest(
568
+
`The ephemeral external IP is an IPv6 address, but the instance with ID ${body.name} does not have a primary network interface with a VPC-private IPv6 address. Add a VPC-private IPv6 address to the interface, or attach a different IP address`
message: `The ephemeral external IP is an IPv4 address, but the instance with ID ${instance.name} does not have a primary network interface with a VPC-private IPv4 address. Add a VPC-private IPv4 address to the interface, or attach a different IP address`,
908
-
},
909
-
{status: 400}
891
+
throwinvalidRequest(
892
+
`The ephemeral external IP is an IPv4 address, but the instance with ID ${instance.name} does not have a primary network interface with a VPC-private IPv4 address. Add a VPC-private IPv4 address to the interface, or attach a different IP address`
message: `The ephemeral external IP is an IPv6 address, but the instance with ID ${instance.name} does not have a primary network interface with a VPC-private IPv6 address. Add a VPC-private IPv6 address to the interface, or attach a different IP address`,
918
-
},
919
-
{status: 400}
897
+
throwinvalidRequest(
898
+
`The ephemeral external IP is an IPv6 address, but the instance with ID ${instance.name} does not have a primary network interface with a VPC-private IPv6 address. Add a VPC-private IPv6 address to the interface, or attach a different IP address`
0 commit comments