cloudprovider: add support for InstanceID method
Signed-off-by: Federico Simoncelli <fsimonce@redhat.com>
This commit is contained in:
@@ -142,7 +142,7 @@ func (v *VagrantCloud) NodeAddresses(instance string) ([]api.NodeAddress, error)
|
||||
return []api.NodeAddress{{Type: api.NodeLegacyHostIP, Address: ip.String()}}, nil
|
||||
}
|
||||
|
||||
// ExternalID returns the cloud provider ID of the specified instance.
|
||||
// ExternalID returns the cloud provider ID of the specified instance (deprecated).
|
||||
func (v *VagrantCloud) ExternalID(instance string) (string, error) {
|
||||
// Due to vagrant not running with a dedicated DNS setup, we return the IP address of a minion as its hostname at this time
|
||||
minion, err := v.getInstanceByAddress(instance)
|
||||
@@ -152,6 +152,11 @@ func (v *VagrantCloud) ExternalID(instance string) (string, error) {
|
||||
return minion.IP, nil
|
||||
}
|
||||
|
||||
// InstanceID returns the cloud provider ID of the specified instance.
|
||||
func (v *VagrantCloud) InstanceID(instance string) (string, error) {
|
||||
return "", nil
|
||||
}
|
||||
|
||||
// saltMinionsByRole filters a list of minions that have a matching role.
|
||||
func (v *VagrantCloud) saltMinionsByRole(minions []SaltMinion, role string) []SaltMinion {
|
||||
var filteredMinions []SaltMinion
|
||||
|
Reference in New Issue
Block a user