Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Make use of or remove unused fields in InstanceProperties and Instance types #723

Closed
gjcolombo opened this issue Jul 16, 2024 · 0 comments · Fixed by #803
Closed

Make use of or remove unused fields in InstanceProperties and Instance types #723

gjcolombo opened this issue Jul 16, 2024 · 0 comments · Fixed by #803
Labels
api Related to the API.

Comments

@gjcolombo
Copy link
Contributor

These structs are part of the API and have long-unused fields. In InstanceProperties the image_id and bootrom_id fields are unused:

#[derive(Clone, Debug, Deserialize, PartialEq, Eq, Serialize, JsonSchema)]
pub struct InstanceProperties {
/// Unique identifier for this Instance.
pub id: Uuid,
/// Human-readable name of the Instance.
pub name: String,
/// Free-form text description of an Instance.
pub description: String,
/// Metadata used to track statistics for this Instance.
pub metadata: InstanceMetadata,
/// ID of the image used to initialize this Instance.
pub image_id: Uuid,
/// ID of the bootrom used to initialize this Instance.
pub bootrom_id: Uuid,
/// Size of memory allocated to the Instance, in MiB.
pub memory: u64,
/// Number of vCPUs to be allocated to the Instance.
pub vcpus: u8,
}

And in Instance (the type returned by GET operations) the disks and nics fields are unused:

#[derive(Clone, Debug, Deserialize, Serialize, JsonSchema)]
pub struct Instance {
pub properties: InstanceProperties,
pub state: InstanceState,
pub disks: Vec<DiskAttachment>,
pub nics: Vec<NetworkInterface>,
}

These fields should either be used or removed. (In the latter case I'm uncertain whether or how the control plane would use this information.)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
api Related to the API.
Projects
None yet
Development

Successfully merging a pull request may close this issue.

1 participant