cloudprovider: add instance id to NodeSpec

Sometimes for external applications it is important to identify the
cloud instance of the nodes. Until this patch there was no contract
that the node name returned by List was also the unique identifier of
the cloud instance. This new API ensures that an external application
can reliably retrieve the relevant instance id of the nodes.

Signed-off-by: Federico Simoncelli <fsimonce@redhat.com>
This commit is contained in:
Federico Simoncelli
2015-02-11 17:37:27 -05:00
parent 8844c06574
commit a450da4fd0
15 changed files with 58 additions and 0 deletions

View File

@@ -59,6 +59,8 @@ type TCPLoadBalancer interface {
type Instances interface {
// IPAddress returns an IP address of the specified instance.
IPAddress(name string) (net.IP, error)
// ExternalID returns the cloud provider ID of the specified instance.
ExternalID(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)
// GetNodeResources gets the resources for a particular node