@@ -17,7 +17,6 @@ limitations under the License.
1717package openstack
1818
1919import (
20- "context"
2120 "fmt"
2221 "regexp"
2322
@@ -55,7 +54,7 @@ func (os *OpenStack) Instances() (cloudprovider.Instances, bool) {
5554
5655// CurrentNodeName implements Instances.CurrentNodeName
5756// Note this is *not* necessarily the same as hostname.
58- func (i * Instances ) CurrentNodeName (ctx context. Context , hostname string ) (types.NodeName , error ) {
57+ func (i * Instances ) CurrentNodeName (hostname string ) (types.NodeName , error ) {
5958 md , err := getMetadata (i .opts .SearchOrder )
6059 if err != nil {
6160 return "" , err
@@ -64,12 +63,12 @@ func (i *Instances) CurrentNodeName(ctx context.Context, hostname string) (types
6463}
6564
6665// AddSSHKeyToAllInstances is not implemented for OpenStack
67- func (i * Instances ) AddSSHKeyToAllInstances (ctx context. Context , user string , keyData []byte ) error {
66+ func (i * Instances ) AddSSHKeyToAllInstances (user string , keyData []byte ) error {
6867 return cloudprovider .NotImplemented
6968}
7069
7170// NodeAddresses implements Instances.NodeAddresses
72- func (i * Instances ) NodeAddresses (ctx context. Context , name types.NodeName ) ([]v1.NodeAddress , error ) {
71+ func (i * Instances ) NodeAddresses (name types.NodeName ) ([]v1.NodeAddress , error ) {
7372 glog .V (4 ).Infof ("NodeAddresses(%v) called" , name )
7473
7574 addrs , err := getAddressesByName (i .compute , name )
@@ -84,7 +83,7 @@ func (i *Instances) NodeAddresses(ctx context.Context, name types.NodeName) ([]v
8483// NodeAddressesByProviderID returns the node addresses of an instances with the specified unique providerID
8584// This method will not be called from the node that is requesting this ID. i.e. metadata service
8685// and other local methods cannot be used here
87- func (i * Instances ) NodeAddressesByProviderID (ctx context. Context , providerID string ) ([]v1.NodeAddress , error ) {
86+ func (i * Instances ) NodeAddressesByProviderID (providerID string ) ([]v1.NodeAddress , error ) {
8887 instanceID , err := instanceIDFromProviderID (providerID )
8988
9089 if err != nil {
@@ -106,7 +105,7 @@ func (i *Instances) NodeAddressesByProviderID(ctx context.Context, providerID st
106105}
107106
108107// ExternalID returns the cloud provider ID of the specified instance (deprecated).
109- func (i * Instances ) ExternalID (ctx context. Context , name types.NodeName ) (string , error ) {
108+ func (i * Instances ) ExternalID (name types.NodeName ) (string , error ) {
110109 srv , err := getServerByName (i .compute , name , true )
111110 if err != nil {
112111 if err == ErrNotFound {
@@ -119,7 +118,7 @@ func (i *Instances) ExternalID(ctx context.Context, name types.NodeName) (string
119118
120119// InstanceExistsByProviderID returns true if the instance with the given provider id still exists and is running.
121120// If false is returned with no error, the instance will be immediately deleted by the cloud controller manager.
122- func (i * Instances ) InstanceExistsByProviderID (ctx context. Context , providerID string ) (bool , error ) {
121+ func (i * Instances ) InstanceExistsByProviderID (providerID string ) (bool , error ) {
123122 instanceID , err := instanceIDFromProviderID (providerID )
124123 if err != nil {
125124 return false , err
@@ -154,7 +153,7 @@ func (os *OpenStack) InstanceID() (string, error) {
154153}
155154
156155// InstanceID returns the cloud provider ID of the specified instance.
157- func (i * Instances ) InstanceID (ctx context. Context , name types.NodeName ) (string , error ) {
156+ func (i * Instances ) InstanceID (name types.NodeName ) (string , error ) {
158157 srv , err := getServerByName (i .compute , name , true )
159158 if err != nil {
160159 if err == ErrNotFound {
@@ -170,7 +169,7 @@ func (i *Instances) InstanceID(ctx context.Context, name types.NodeName) (string
170169// InstanceTypeByProviderID returns the cloudprovider instance type of the node with the specified unique providerID
171170// This method will not be called from the node that is requesting this ID. i.e. metadata service
172171// and other local methods cannot be used here
173- func (i * Instances ) InstanceTypeByProviderID (ctx context. Context , providerID string ) (string , error ) {
172+ func (i * Instances ) InstanceTypeByProviderID (providerID string ) (string , error ) {
174173 instanceID , err := instanceIDFromProviderID (providerID )
175174
176175 if err != nil {
@@ -187,7 +186,7 @@ func (i *Instances) InstanceTypeByProviderID(ctx context.Context, providerID str
187186}
188187
189188// InstanceType returns the type of the specified instance.
190- func (i * Instances ) InstanceType (ctx context. Context , name types.NodeName ) (string , error ) {
189+ func (i * Instances ) InstanceType (name types.NodeName ) (string , error ) {
191190 srv , err := getServerByName (i .compute , name , true )
192191
193192 if err != nil {
0 commit comments