Fix machine image

Make sure setting machine image to `testing` pulls down the testing
stream, and not the next stream

Signed-off-by: Ashley Cui <acui@redhat.com>
This commit is contained in:
Ashley Cui
2021-09-22 14:38:24 -04:00
parent cd7b48198c
commit f5f95d722f
3 changed files with 4 additions and 2 deletions

View File

@ -40,7 +40,7 @@ do these things manually or handle otherwise.
#### **--image-path**
Fully qualified path or URL to the VM image.
Can also be set to `testing` or `stable` to pull down default image.
Can also be set to `testing`, `next`, or `stable` to pull down default image.
Defaults to `testing`.
#### **--memory**, **-m**=*number*

View File

@ -139,6 +139,8 @@ func getFCOSDownload(imageStream string) (*fcosDownloadInfo, error) {
)
switch imageStream {
case "testing", "":
streamType = fedoracoreos.StreamTesting
case "next":
streamType = fedoracoreos.StreamNext
case "stable":
streamType = fedoracoreos.StreamStable

View File

@ -140,7 +140,7 @@ func (v *MachineVM) Init(opts machine.InitOptions) error {
v.IdentityPath = filepath.Join(sshDir, v.Name)
switch opts.ImagePath {
case "testing", "stable", "":
case "testing", "next", "stable", "":
// Get image as usual
dd, err := machine.NewFcosDownloader(vmtype, v.Name, opts.ImagePath)
if err != nil {