@@ -77,12 +77,12 @@ func extractNodeAddressesFromVNIC(vnic *core.Vnic) ([]api.NodeAddress, error) {
77
77
func (cp * CloudProvider ) NodeAddresses (name types.NodeName ) ([]api.NodeAddress , error ) {
78
78
glog .V (4 ).Infof ("NodeAddresses(%q) called" , name )
79
79
80
- inst , err := cp .client .Instances ().GetInstanceByNodeName (context .TODO (), mapNodeNameToInstanceName (name ))
80
+ inst , err := cp .client .Compute ().GetInstanceByNodeName (context .TODO (), mapNodeNameToInstanceName (name ))
81
81
if err != nil {
82
82
return []api.NodeAddress {}, errors .Wrap (err , "GetInstanceByNodeName" )
83
83
}
84
84
85
- vnic , err := cp .client .Instances ().GetPrimaryVNICForInstance (context .TODO (), * inst .Id )
85
+ vnic , err := cp .client .Compute ().GetPrimaryVNICForInstance (context .TODO (), * inst .Id )
86
86
if err != nil {
87
87
return []api.NodeAddress {}, errors .Wrap (err , "GetPrimaryVNICForInstance" )
88
88
}
@@ -97,7 +97,7 @@ func (cp *CloudProvider) NodeAddresses(name types.NodeName) ([]api.NodeAddress,
97
97
func (cp * CloudProvider ) NodeAddressesByProviderID (providerID string ) ([]api.NodeAddress , error ) {
98
98
glog .V (4 ).Infof ("NodeAddressesByProviderID(%q) called" , providerID )
99
99
instanceID := util .MapProviderIDToInstanceID (providerID )
100
- vnic , err := cp .client .Instances ().GetPrimaryVNICForInstance (context .TODO (), instanceID )
100
+ vnic , err := cp .client .Compute ().GetPrimaryVNICForInstance (context .TODO (), instanceID )
101
101
if err != nil {
102
102
return []api.NodeAddress {}, errors .Wrap (err , "GetPrimaryVNICForInstance" )
103
103
}
@@ -111,7 +111,7 @@ func (cp *CloudProvider) ExternalID(nodeName types.NodeName) (string, error) {
111
111
glog .V (4 ).Infof ("ExternalID(%q) called" , nodeName )
112
112
113
113
instName := mapNodeNameToInstanceName (nodeName )
114
- inst , err := cp .client .Instances ().GetInstanceByNodeName (context .TODO (), instName )
114
+ inst , err := cp .client .Compute ().GetInstanceByNodeName (context .TODO (), instName )
115
115
if client .IsNotFound (err ) {
116
116
glog .Infof ("Instance %q was not found. Unable to get ExternalID: %v" , instName , err )
117
117
return "" , cloudprovider .InstanceNotFound
@@ -131,7 +131,7 @@ func (cp *CloudProvider) InstanceID(nodeName types.NodeName) (string, error) {
131
131
glog .V (4 ).Infof ("InstanceID(%q) called" , nodeName )
132
132
133
133
name := mapNodeNameToInstanceName (nodeName )
134
- inst , err := cp .client .Instances ().GetInstanceByNodeName (context .TODO (), name )
134
+ inst , err := cp .client .Compute ().GetInstanceByNodeName (context .TODO (), name )
135
135
if err != nil {
136
136
return "" , errors .Wrap (err , "GetInstanceByNodeName" )
137
137
}
@@ -142,7 +142,7 @@ func (cp *CloudProvider) InstanceID(nodeName types.NodeName) (string, error) {
142
142
func (cp * CloudProvider ) InstanceType (name types.NodeName ) (string , error ) {
143
143
glog .V (4 ).Infof ("InstanceType(%q) called" , name )
144
144
145
- inst , err := cp .client .Instances ().GetInstanceByNodeName (context .TODO (), mapNodeNameToInstanceName (name ))
145
+ inst , err := cp .client .Compute ().GetInstanceByNodeName (context .TODO (), mapNodeNameToInstanceName (name ))
146
146
if err != nil {
147
147
return "" , errors .Wrap (err , "GetInstanceByNodeName" )
148
148
}
@@ -154,7 +154,7 @@ func (cp *CloudProvider) InstanceTypeByProviderID(providerID string) (string, er
154
154
glog .V (4 ).Infof ("InstanceTypeByProviderID(%q) called" , providerID )
155
155
156
156
instanceID := util .MapProviderIDToInstanceID (providerID )
157
- inst , err := cp .client .Instances ().GetInstance (context .TODO (), instanceID )
157
+ inst , err := cp .client .Compute ().GetInstance (context .TODO (), instanceID )
158
158
if err != nil {
159
159
return "" , errors .Wrap (err , "GetInstance" )
160
160
}
@@ -180,7 +180,7 @@ func (cp *CloudProvider) CurrentNodeName(hostname string) (types.NodeName, error
180
180
func (cp * CloudProvider ) InstanceExistsByProviderID (providerID string ) (bool , error ) {
181
181
glog .V (4 ).Infof ("InstanceExistsByProviderID(%q) called" , providerID )
182
182
instanceID := util .MapProviderIDToInstanceID (providerID )
183
- instance , err := cp .client .Instances ().GetInstance (context .TODO (), instanceID )
183
+ instance , err := cp .client .Compute ().GetInstance (context .TODO (), instanceID )
184
184
if client .IsNotFound (err ) {
185
185
return false , nil
186
186
}
0 commit comments