Skip to content

Commit c603368

Browse files
Update pinned omicron version (#474)
* Update packer version * update packer image, generated api * Add codemods to temporarily patch up generator issues Co-authored-by: David Crespo <[email protected]>
1 parent 761664b commit c603368

40 files changed

+2356
-1758
lines changed

.github/workflows/packer.yaml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -46,7 +46,7 @@ jobs:
4646
CLOUDFLARE_TOKEN: ${{secrets.CLOUDFLARE_TOKEN}}
4747
SSL_CERT: ${{secrets.SSL_CERT}}
4848
SSL_KEY: ${{secrets.SSL_KEY}}
49-
API_VERSION: ee3fa440088b0298c7df1a84fec1811a8448b424
49+
API_VERSION: 9ecefb6eb2d4c38040ad5afa33dd84f9ce22d0a2
5050

5151
# get the image information from gcloud
5252
- name: Get image information

app/docs/nexus-openapi.json

Lines changed: 305 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -1142,6 +1142,252 @@
11421142
}
11431143
}
11441144
},
1145+
"/projects/{project_name}/vpcs/{vpc_name}/subnets": {
1146+
"get": {
1147+
"description": "List subnets in a VPC.",
1148+
"operationId": "vpc_subnets_get",
1149+
"parameters": [
1150+
{
1151+
"in": "query",
1152+
"name": "limit",
1153+
"schema": {
1154+
"description": "Maximum number of items returned by a single call",
1155+
"type": "integer",
1156+
"format": "uint32",
1157+
"minimum": 1
1158+
},
1159+
"style": "form"
1160+
},
1161+
{
1162+
"in": "query",
1163+
"name": "page_token",
1164+
"schema": {
1165+
"description": "Token returned by previous call to retreive the subsequent page",
1166+
"type": "string"
1167+
},
1168+
"style": "form"
1169+
},
1170+
{
1171+
"in": "query",
1172+
"name": "sort_by",
1173+
"schema": {
1174+
"$ref": "#/components/schemas/NameSortMode"
1175+
},
1176+
"style": "form"
1177+
},
1178+
{
1179+
"in": "path",
1180+
"name": "project_name",
1181+
"required": true,
1182+
"schema": {
1183+
"$ref": "#/components/schemas/Name"
1184+
},
1185+
"style": "simple"
1186+
},
1187+
{
1188+
"in": "path",
1189+
"name": "vpc_name",
1190+
"required": true,
1191+
"schema": {
1192+
"$ref": "#/components/schemas/Name"
1193+
},
1194+
"style": "simple"
1195+
}
1196+
],
1197+
"responses": {
1198+
"200": {
1199+
"description": "successful operation",
1200+
"content": {
1201+
"application/json": {
1202+
"schema": {
1203+
"$ref": "#/components/schemas/VpcSubnetResultsPage"
1204+
}
1205+
}
1206+
}
1207+
}
1208+
},
1209+
"x-dropshot-pagination": true
1210+
},
1211+
"post": {
1212+
"description": "Create a subnet in a VPC.",
1213+
"operationId": "vpc_subnets_post",
1214+
"parameters": [
1215+
{
1216+
"in": "path",
1217+
"name": "project_name",
1218+
"required": true,
1219+
"schema": {
1220+
"$ref": "#/components/schemas/Name"
1221+
},
1222+
"style": "simple"
1223+
},
1224+
{
1225+
"in": "path",
1226+
"name": "vpc_name",
1227+
"required": true,
1228+
"schema": {
1229+
"$ref": "#/components/schemas/Name"
1230+
},
1231+
"style": "simple"
1232+
}
1233+
],
1234+
"requestBody": {
1235+
"content": {
1236+
"application/json": {
1237+
"schema": {
1238+
"$ref": "#/components/schemas/VpcSubnetCreateParams"
1239+
}
1240+
}
1241+
},
1242+
"required": true
1243+
},
1244+
"responses": {
1245+
"201": {
1246+
"description": "successful creation",
1247+
"content": {
1248+
"application/json": {
1249+
"schema": {
1250+
"$ref": "#/components/schemas/VpcSubnet"
1251+
}
1252+
}
1253+
}
1254+
}
1255+
}
1256+
}
1257+
},
1258+
"/projects/{project_name}/vpcs/{vpc_name}/subnets/{subnet_name}": {
1259+
"get": {
1260+
"description": "Get subnet in a VPC.",
1261+
"operationId": "vpc_subnets_get_subnet",
1262+
"parameters": [
1263+
{
1264+
"in": "path",
1265+
"name": "project_name",
1266+
"required": true,
1267+
"schema": {
1268+
"$ref": "#/components/schemas/Name"
1269+
},
1270+
"style": "simple"
1271+
},
1272+
{
1273+
"in": "path",
1274+
"name": "subnet_name",
1275+
"required": true,
1276+
"schema": {
1277+
"$ref": "#/components/schemas/Name"
1278+
},
1279+
"style": "simple"
1280+
},
1281+
{
1282+
"in": "path",
1283+
"name": "vpc_name",
1284+
"required": true,
1285+
"schema": {
1286+
"$ref": "#/components/schemas/Name"
1287+
},
1288+
"style": "simple"
1289+
}
1290+
],
1291+
"responses": {
1292+
"200": {
1293+
"description": "successful operation",
1294+
"content": {
1295+
"application/json": {
1296+
"schema": {
1297+
"$ref": "#/components/schemas/VpcSubnet"
1298+
}
1299+
}
1300+
}
1301+
}
1302+
}
1303+
},
1304+
"put": {
1305+
"description": "Update a VPC Subnet.",
1306+
"operationId": "vpc_subnets_put_subnet",
1307+
"parameters": [
1308+
{
1309+
"in": "path",
1310+
"name": "project_name",
1311+
"required": true,
1312+
"schema": {
1313+
"$ref": "#/components/schemas/Name"
1314+
},
1315+
"style": "simple"
1316+
},
1317+
{
1318+
"in": "path",
1319+
"name": "subnet_name",
1320+
"required": true,
1321+
"schema": {
1322+
"$ref": "#/components/schemas/Name"
1323+
},
1324+
"style": "simple"
1325+
},
1326+
{
1327+
"in": "path",
1328+
"name": "vpc_name",
1329+
"required": true,
1330+
"schema": {
1331+
"$ref": "#/components/schemas/Name"
1332+
},
1333+
"style": "simple"
1334+
}
1335+
],
1336+
"requestBody": {
1337+
"content": {
1338+
"application/json": {
1339+
"schema": {
1340+
"$ref": "#/components/schemas/VpcSubnetUpdateParams"
1341+
}
1342+
}
1343+
},
1344+
"required": true
1345+
},
1346+
"responses": {
1347+
"200": {
1348+
"description": "successful operation"
1349+
}
1350+
}
1351+
},
1352+
"delete": {
1353+
"description": "Delete a subnet from a VPC.",
1354+
"operationId": "vpc_subnets_delete_subnet",
1355+
"parameters": [
1356+
{
1357+
"in": "path",
1358+
"name": "project_name",
1359+
"required": true,
1360+
"schema": {
1361+
"$ref": "#/components/schemas/Name"
1362+
},
1363+
"style": "simple"
1364+
},
1365+
{
1366+
"in": "path",
1367+
"name": "subnet_name",
1368+
"required": true,
1369+
"schema": {
1370+
"$ref": "#/components/schemas/Name"
1371+
},
1372+
"style": "simple"
1373+
},
1374+
{
1375+
"in": "path",
1376+
"name": "vpc_name",
1377+
"required": true,
1378+
"schema": {
1379+
"$ref": "#/components/schemas/Name"
1380+
},
1381+
"style": "simple"
1382+
}
1383+
],
1384+
"responses": {
1385+
"204": {
1386+
"description": "successful deletion"
1387+
}
1388+
}
1389+
}
1390+
},
11451391
"/sagas": {
11461392
"get": {
11471393
"description": "List all sagas (for debugging)",
@@ -1348,7 +1594,7 @@
13481594
},
13491595
"DiskState": {
13501596
"description": "State of a Disk (primarily: attached or not)",
1351-
"anyOf": [
1597+
"oneOf": [
13521598
{
13531599
"description": "Disk is being initialized",
13541600
"type": "object",
@@ -1728,7 +1974,7 @@
17281974
"required": ["id", "state"]
17291975
},
17301976
"SagaErrorInfo": {
1731-
"anyOf": [
1977+
"oneOf": [
17321978
{
17331979
"type": "object",
17341980
"properties": {
@@ -1810,7 +2056,7 @@
18102056
"required": ["items"]
18112057
},
18122058
"SagaState": {
1813-
"anyOf": [
2059+
"oneOf": [
18142060
{
18152061
"type": "object",
18162062
"properties": {
@@ -1939,12 +2185,6 @@
19392185
"description": "timestamp when this resource was last modified",
19402186
"type": "string",
19412187
"format": "date-time"
1942-
},
1943-
"vpcSubnets": {
1944-
"type": "array",
1945-
"items": {
1946-
"$ref": "#/components/schemas/VpcSubnet"
1947-
}
19482188
}
19492189
},
19502190
"required": [
@@ -1954,8 +2194,7 @@
19542194
"name",
19552195
"projectId",
19562196
"timeCreated",
1957-
"timeModified",
1958-
"vpcSubnets"
2197+
"timeModified"
19592198
]
19602199
},
19612200
"VpcCreateParams": {
@@ -2013,6 +2252,61 @@
20132252
},
20142253
"required": ["identity", "vpc_id"]
20152254
},
2255+
"VpcSubnetCreateParams": {
2256+
"description": "Create-time parameters for a [`VpcSubnet`]",
2257+
"type": "object",
2258+
"properties": {
2259+
"description": {
2260+
"type": "string"
2261+
},
2262+
"ipv4Block": {
2263+
"$ref": "#/components/schemas/Ipv4Net"
2264+
},
2265+
"ipv6Block": {
2266+
"$ref": "#/components/schemas/Ipv6Net"
2267+
},
2268+
"name": {
2269+
"$ref": "#/components/schemas/Name"
2270+
}
2271+
},
2272+
"required": ["description", "name"]
2273+
},
2274+
"VpcSubnetResultsPage": {
2275+
"description": "A single page of results",
2276+
"type": "object",
2277+
"properties": {
2278+
"items": {
2279+
"description": "list of items on this page of results",
2280+
"type": "array",
2281+
"items": {
2282+
"$ref": "#/components/schemas/VpcSubnet"
2283+
}
2284+
},
2285+
"next_page": {
2286+
"description": "token used to fetch the next page of results (if any)",
2287+
"type": "string"
2288+
}
2289+
},
2290+
"required": ["items"]
2291+
},
2292+
"VpcSubnetUpdateParams": {
2293+
"description": "Updateable properties of a [`VpcSubnet`]",
2294+
"type": "object",
2295+
"properties": {
2296+
"description": {
2297+
"type": "string"
2298+
},
2299+
"ipv4Block": {
2300+
"$ref": "#/components/schemas/Ipv4Net"
2301+
},
2302+
"ipv6Block": {
2303+
"$ref": "#/components/schemas/Ipv6Net"
2304+
},
2305+
"name": {
2306+
"$ref": "#/components/schemas/Name"
2307+
}
2308+
}
2309+
},
20162310
"VpcUpdateParams": {
20172311
"description": "Updateable properties of a [`Vpc`]",
20182312
"type": "object",

app/pages/instances/create/existing-disk-modal.tsx

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -15,9 +15,7 @@ type Props = {
1515
}
1616

1717
const isUnattached = ({ state }: Disk) => {
18-
// HACK: the DiskState types are all messed up, so here we work around that
19-
// by casting the state to a string, which we know it is
20-
const stateStr = state.state as string
18+
const stateStr = state.state
2119
return (
2220
stateStr !== 'attached' &&
2321
stateStr !== 'attaching' &&

0 commit comments

Comments
 (0)