Skip to content

Commit fdf300e

Browse files
authored
Add parent ip_pool_id to views::IpPoolRange (#3445)
Following the pattern of other resources.
1 parent a4e42f9 commit fdf300e

File tree

3 files changed

+7
-0
lines changed

3 files changed

+7
-0
lines changed

nexus/db-model/src/ip_pool.rs

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -127,6 +127,7 @@ impl From<IpPoolRange> for views::IpPoolRange {
127127
fn from(range: IpPoolRange) -> Self {
128128
Self {
129129
id: range.id,
130+
ip_pool_id: range.ip_pool_id,
130131
time_created: range.time_created,
131132
range: IpRange::from(&range),
132133
}

nexus/types/src/external_api/views.rs

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -247,6 +247,7 @@ pub struct IpPool {
247247
#[derive(Clone, Copy, Debug, Deserialize, Serialize, JsonSchema)]
248248
pub struct IpPoolRange {
249249
pub id: Uuid,
250+
pub ip_pool_id: Uuid,
250251
pub time_created: DateTime<Utc>,
251252
pub range: IpRange,
252253
}

openapi/nexus.json

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -10546,6 +10546,10 @@
1054610546
"type": "string",
1054710547
"format": "uuid"
1054810548
},
10549+
"ip_pool_id": {
10550+
"type": "string",
10551+
"format": "uuid"
10552+
},
1054910553
"range": {
1055010554
"$ref": "#/components/schemas/IpRange"
1055110555
},
@@ -10556,6 +10560,7 @@
1055610560
},
1055710561
"required": [
1055810562
"id",
10563+
"ip_pool_id",
1055910564
"range",
1056010565
"time_created"
1056110566
]

0 commit comments

Comments
 (0)