mirror of
https://github.com/hashicorp/packer.git
synced 2026-02-20 08:20:06 -05:00
16 lines
304 B
Go
16 lines
304 B
Go
package cloudstack
|
|
|
|
import (
|
|
"fmt"
|
|
|
|
"github.com/hashicorp/packer-plugin-sdk/multistep"
|
|
)
|
|
|
|
func commPort(state multistep.StateBag) (int, error) {
|
|
commPort, hasPort := state.Get("commPort").(int)
|
|
if !hasPort {
|
|
return 0, fmt.Errorf("Failed to retrieve communication port")
|
|
}
|
|
|
|
return commPort, nil
|
|
}
|