Skip to content

Commit 36ac86a

Browse files
authored
bump API for prefix_len -> prefix_length change (#3157)
1 parent 5939f45 commit 36ac86a

6 files changed

Lines changed: 20 additions & 16 deletions

File tree

OMICRON_VERSION

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1 +1 @@
1-
10b9f2fb87240fef1259c6240d233520a400ca16
1+
d7c3b00d743bcc9212b222a74ae27cc970b1ee2c

app/api/__generated__/Api.ts

Lines changed: 9 additions & 6 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

app/api/__generated__/OMICRON_VERSION

Lines changed: 1 addition & 1 deletion
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

app/api/__generated__/validate.ts

Lines changed: 3 additions & 2 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

app/forms/external-subnet-create.tsx

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -42,7 +42,7 @@ type FormValues = {
4242
name: string
4343
description: string
4444
allocationType: 'auto' | 'explicit'
45-
prefixLen: number
45+
prefixLength: number
4646
pool: string
4747
subnet: string
4848
}
@@ -51,7 +51,7 @@ const defaultFormValues: Omit<FormValues, 'pool'> = {
5151
name: '',
5252
description: '',
5353
allocationType: 'auto',
54-
prefixLen: 24,
54+
prefixLength: 24,
5555
subnet: '',
5656
}
5757

@@ -93,12 +93,12 @@ export default function CreateExternalSubnetSideModalForm() {
9393
formType="create"
9494
resourceName="external subnet"
9595
onDismiss={() => navigate(pb.externalSubnets(projectSelector))}
96-
onSubmit={({ name, description, allocationType, prefixLen, pool, subnet }) => {
96+
onSubmit={({ name, description, allocationType, prefixLength, pool, subnet }) => {
9797
const allocator = match(allocationType)
9898
.with('explicit', () => ({ type: 'explicit' as const, subnet }))
9999
.with('auto', () => ({
100100
type: 'auto' as const,
101-
prefixLen,
101+
prefixLength,
102102
poolSelector: { type: 'explicit' as const, pool },
103103
}))
104104
.exhaustive()
@@ -134,7 +134,7 @@ export default function CreateExternalSubnetSideModalForm() {
134134
description="Subnet pool to allocate from"
135135
/>
136136
<NumberField
137-
name="prefixLen"
137+
name="prefixLength"
138138
label="Prefix length"
139139
required
140140
control={form.control}

mock-api/msw/handlers.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -306,7 +306,7 @@ export const handlers = makeHandlers({
306306
.with(undefined, () => lookup.defaultSubnetPool())
307307
.exhaustive()
308308
const idx = db.externalSubnets.length + 1
309-
return { pool, subnet: `10.128.${idx}.0/${a.prefix_len}` }
309+
return { pool, subnet: `10.128.${idx}.0/${a.prefix_length}` }
310310
})
311311
.exhaustive()
312312

0 commit comments

Comments
 (0)