Skip to content

Add ip_pool_id to floating IP response #5716

@david-crespo

Description

@david-crespo

It's on the model:

pub struct FloatingIp {
#[diesel(embed)]
pub identity: FloatingIpIdentity,
pub ip_pool_id: Uuid,
pub ip_pool_range_id: Uuid,
pub is_service: bool,
pub parent_id: Option<Uuid>,
pub ip: IpNetwork,
pub project_id: Uuid,
}

But not on the view:

pub struct FloatingIp {
#[serde(flatten)]
pub identity: IdentityMetadata,
/// The IP address held by this resource.
pub ip: IpAddr,
/// The project this resource exists within.
pub project_id: Uuid,
/// The ID of the instance that this Floating IP is attached to,
/// if it is presently in use.
pub instance_id: Option<Uuid>,
}

It would be trivial to add and we think we want this info on the frontend. For example, imagine there are two pools linked to a silo, one with public IPs and one with private IPs. You would want to know which pool a floating IP came from. Right now you'd have to put it in the name or description.

Metadata

Metadata

Assignees

Labels

No labels
No labels

Type

No type

Projects

No projects

Milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions