mirror of
https://github.com/k3s-io/kubernetes.git
synced 2025-07-30 23:15:14 +00:00
cloudprovider: openstack InstanceID implementation
Signed-off-by: Federico Simoncelli <fsimonce@redhat.com>
This commit is contained in:
parent
afcda70190
commit
154eccefe2
@ -368,7 +368,13 @@ func (i *Instances) ExternalID(name string) (string, error) {
|
||||
|
||||
// InstanceID returns the cloud provider ID of the specified instance.
|
||||
func (i *Instances) InstanceID(name string) (string, error) {
|
||||
return "", nil
|
||||
srv, err := getServerByName(i.compute, name)
|
||||
if err != nil {
|
||||
return "", err
|
||||
}
|
||||
// In the future it is possible to also return an endpoint as:
|
||||
// <endpoint>/<instanceid>
|
||||
return "/" + srv.ID, nil
|
||||
}
|
||||
|
||||
func (i *Instances) GetNodeResources(name string) (*api.NodeResources, error) {
|
||||
|
Loading…
Reference in New Issue
Block a user