Resolve the AMI for a machine, deriving it from the instance type's architecture unless the config pins one explicitly.
(desc: "MachineDesc")
| 76 | |
| 77 | |
| 78 | def resolve_ami(desc: "MachineDesc") -> str: |
| 79 | """Resolve the AMI for a machine, deriving it from the instance type's |
| 80 | architecture unless the config pins one explicitly.""" |
| 81 | if desc.ami: |
| 82 | return desc.ami |
| 83 | return AMIS_BY_ARCH[instance_type_arch(desc.instance_type)] |
| 84 | |
| 85 | |
| 86 | def tags(i: Instance) -> dict[str, str]: |
no test coverage detected