From 29e95431c53851d5515767e4070a2537ff356108 Mon Sep 17 00:00:00 2001 From: Justin Santa Barbara Date: Fri, 22 Jul 2016 21:57:03 -0400 Subject: [PATCH] Correctly document cloudprovider Instances contract The requirement that ExternalID returns InstanceNotFound when the instance not found was incorrectly documented on InstanceID and InstanceType. This requirement arises from the node controller, which is the only place that checks for the InstanceNotFound error. --- pkg/cloudprovider/cloud.go | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/pkg/cloudprovider/cloud.go b/pkg/cloudprovider/cloud.go index 59cd18fa401..a774682247c 100644 --- a/pkg/cloudprovider/cloud.go +++ b/pkg/cloudprovider/cloud.go @@ -106,12 +106,11 @@ type Instances interface { // make this clearer. NodeAddresses(name string) ([]api.NodeAddress, error) // ExternalID returns the cloud provider ID of the specified instance (deprecated). + // Note that if the instance does not exist or is no longer running, we must return ("", cloudprovider.InstanceNotFound) ExternalID(name string) (string, error) // InstanceID returns the cloud provider ID of the specified instance. - // Note that if the instance does not exist or is no longer running, we must return ("", cloudprovider.InstanceNotFound) InstanceID(name string) (string, error) // InstanceType returns the type of the specified instance. - // Note that if the instance does not exist or is no longer running, we must return ("", cloudprovider.InstanceNotFound) InstanceType(name string) (string, error) // List lists instances that match 'filter' which is a regular expression which must match the entire instance name (fqdn) List(filter string) ([]string, error)