Skip to content

Generate boot disk name from image name instead of ID #2476

Closed

Description

@david-crespo

abc-ae46ddf5-a8d5-40fa-bcda-fca-71c32d is not the most useful name. We could stick "silo" or "project" in there to mark whether it was a silo or project image, but that would probably be more confusing than not. We already have the generated random part to avoid name collisions.

const getBootDiskAttachment = (values: InstanceCreateInput): InstanceDiskAttachment => {
if (values.bootDiskSourceType === 'disk') {
return { type: 'attach', name: values.diskSource }
}
const source =
values.bootDiskSourceType === 'siloImage'
? values.siloImageSource
: values.projectImageSource
return {
type: 'create',
name: values.bootDiskName || genName(values.name, source),
description: `Created as a boot disk for ${values.name}`,
size: values.bootDiskSize * GiB,
diskSource: { type: 'image', imageId: source },
}
}

Activity

  1. self-assigned this
    on Nov 12, 2024
  2. added this to the 12 milestone on Nov 12, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

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