17 lines
311 B
Go
Raw Normal View History

2016-01-11 12:22:41 +01:00
package cloudstack
import (
"fmt"
2020-11-17 16:31:03 -08:00
"github.com/hashicorp/packer/packer-plugin-sdk/multistep"
2016-01-11 12:22:41 +01:00
)
func commPort(state multistep.StateBag) (int, error) {
commPort, hasPort := state.Get("commPort").(int)
if !hasPort {
return 0, fmt.Errorf("Failed to retrieve communication port")
2016-01-11 12:22:41 +01:00
}
return commPort, nil
2016-01-11 12:22:41 +01:00
}