Skip to content

Commit e508fdb

Browse files
committed
fix: Address explicit nullable types in network
Some conversion schemes missed explicit null support. Change-Id: I01ed16f2690c78492a0d8673ad86f67de92c80ae Changes are triggered by https://review.opendev.org/949561
1 parent 023425e commit e508fdb

File tree

16 files changed

+310
-114
lines changed

16 files changed

+310
-114
lines changed

openstack_cli/src/network/v2/floatingip/create.rs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -167,7 +167,7 @@ impl FloatingipCommand {
167167
let args = &self.floatingip;
168168
let mut floatingip_builder = create::FloatingipBuilder::default();
169169
if let Some(val) = &args.floating_ip_address {
170-
floatingip_builder.floating_ip_address(val);
170+
floatingip_builder.floating_ip_address(Some(val.into()));
171171
}
172172

173173
if let Some(val) = &args.subnet_id {
@@ -181,7 +181,7 @@ impl FloatingipCommand {
181181
}
182182

183183
if let Some(val) = &args.fixed_ip_address {
184-
floatingip_builder.fixed_ip_address(val);
184+
floatingip_builder.fixed_ip_address(Some(val.into()));
185185
}
186186

187187
if let Some(val) = &args.tenant_id {

openstack_cli/src/network/v2/floatingip/set.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -133,7 +133,7 @@ impl FloatingipCommand {
133133
}
134134

135135
if let Some(val) = &args.fixed_ip_address {
136-
floatingip_builder.fixed_ip_address(val);
136+
floatingip_builder.fixed_ip_address(Some(val.into()));
137137
}
138138

139139
if let Some(val) = &args.qos_policy_id {

openstack_cli/src/network/v2/local_ip/create.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -128,7 +128,7 @@ impl LocalIpCommand {
128128
}
129129

130130
if let Some(val) = &args.local_ip_address {
131-
local_ip_builder.local_ip_address(val);
131+
local_ip_builder.local_ip_address(Some(val.into()));
132132
}
133133

134134
if let Some(val) = &args.ip_mode {

openstack_cli/src/network/v2/local_ip/port_association/create.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -116,7 +116,7 @@ impl PortAssociationCommand {
116116
}
117117

118118
if let Some(val) = &args.fixed_ip {
119-
port_association_builder.fixed_ip(val);
119+
port_association_builder.fixed_ip(Some(val.into()));
120120
}
121121

122122
if let Some(val) = &args.project_id {

openstack_cli/src/network/v2/ndp_proxy/create.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -113,7 +113,7 @@ impl NdpProxyCommand {
113113
}
114114

115115
if let Some(val) = &args.ip_address {
116-
ndp_proxy_builder.ip_address(val);
116+
ndp_proxy_builder.ip_address(Some(val.into()));
117117
}
118118

119119
if let Some(val) = &args.description {

openstack_cli/src/network/v2/subnet/create.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -257,7 +257,7 @@ impl SubnetCommand {
257257
}
258258

259259
if let Some(val) = &args.gateway_ip {
260-
subnet_builder.gateway_ip(val);
260+
subnet_builder.gateway_ip(Some(val.into()));
261261
}
262262

263263
if let Some(val) = &args.allocation_pools {

openstack_cli/src/network/v2/subnet/set.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -176,7 +176,7 @@ impl SubnetCommand {
176176
}
177177

178178
if let Some(val) = &args.gateway_ip {
179-
subnet_builder.gateway_ip(val);
179+
subnet_builder.gateway_ip(Some(val.into()));
180180
}
181181

182182
if let Some(val) = &args.allocation_pools {

openstack_sdk/src/api/network/v2/floatingip/create.rs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -92,12 +92,12 @@ pub struct Floatingip<'a> {
9292
/// the `fixed_ip_address` parameter.
9393
#[serde(skip_serializing_if = "Option::is_none")]
9494
#[builder(default, setter(into))]
95-
pub(crate) fixed_ip_address: Option<Cow<'a, str>>,
95+
pub(crate) fixed_ip_address: Option<Option<Cow<'a, str>>>,
9696

9797
/// The floating IP address.
9898
#[serde(skip_serializing_if = "Option::is_none")]
9999
#[builder(default, setter(into))]
100-
pub(crate) floating_ip_address: Option<Cow<'a, str>>,
100+
pub(crate) floating_ip_address: Option<Option<Cow<'a, str>>>,
101101

102102
/// The ID of the network associated with the floating IP.
103103
#[serde()]

openstack_sdk/src/api/network/v2/floatingip/set.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -60,7 +60,7 @@ pub struct Floatingip<'a> {
6060
/// the `fixed_ip_address` parameter.
6161
#[serde(skip_serializing_if = "Option::is_none")]
6262
#[builder(default, setter(into))]
63-
pub(crate) fixed_ip_address: Option<Cow<'a, str>>,
63+
pub(crate) fixed_ip_address: Option<Option<Cow<'a, str>>>,
6464

6565
/// The ID of a port associated with the floating IP. To associate the
6666
/// floating IP with a fixed IP, you must specify the ID of the internal

openstack_sdk/src/api/network/v2/local_ip/create.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -45,7 +45,7 @@ pub struct LocalIp<'a> {
4545

4646
#[serde(skip_serializing_if = "Option::is_none")]
4747
#[builder(default, setter(into))]
48-
pub(crate) local_ip_address: Option<Cow<'a, str>>,
48+
pub(crate) local_ip_address: Option<Option<Cow<'a, str>>>,
4949

5050
#[serde(skip_serializing_if = "Option::is_none")]
5151
#[builder(default, setter(into))]

0 commit comments

Comments
 (0)