mirror of
https://github.com/k3s-io/kubernetes.git
synced 2025-09-17 23:19:26 +00:00
cloudprovider: add support for InstanceID method
Signed-off-by: Federico Simoncelli <fsimonce@redhat.com>
This commit is contained in:
@@ -488,7 +488,7 @@ func (gce *GCECloud) NodeAddresses(_ string) ([]api.NodeAddress, error) {
|
||||
}, nil
|
||||
}
|
||||
|
||||
// ExternalID returns the cloud provider ID of the specified instance.
|
||||
// ExternalID returns the cloud provider ID of the specified instance (deprecated).
|
||||
func (gce *GCECloud) ExternalID(instance string) (string, error) {
|
||||
inst, err := gce.getInstanceByName(instance)
|
||||
if err != nil {
|
||||
@@ -497,6 +497,11 @@ func (gce *GCECloud) ExternalID(instance string) (string, error) {
|
||||
return strconv.FormatUint(inst.Id, 10), nil
|
||||
}
|
||||
|
||||
// InstanceID returns the cloud provider ID of the specified instance.
|
||||
func (gce *GCECloud) InstanceID(instance string) (string, error) {
|
||||
return "", nil
|
||||
}
|
||||
|
||||
// List is an implementation of Instances.List.
|
||||
func (gce *GCECloud) List(filter string) ([]string, error) {
|
||||
listCall := gce.service.Instances.List(gce.projectID, gce.zone)
|
||||
|
Reference in New Issue
Block a user