@@ -78,12 +78,12 @@ func extractNodeAddressesFromVNIC(vnic *core.Vnic) ([]api.NodeAddress, error) {
78
78
func (cp * CloudProvider ) NodeAddresses (ctx context.Context , name types.NodeName ) ([]api.NodeAddress , error ) {
79
79
glog .V (4 ).Infof ("NodeAddresses(%q) called" , name )
80
80
81
- inst , err := cp .client .Compute ().GetInstanceByNodeName (ctx , mapNodeNameToInstanceName (name ))
81
+ inst , err := cp .client .Compute ().GetInstanceByNodeName (ctx , cp . config . Auth . CompartmentOCID , cp . config . VCNID , mapNodeNameToInstanceName (name ))
82
82
if err != nil {
83
83
return nil , errors .Wrap (err , "GetInstanceByNodeName" )
84
84
}
85
85
86
- vnic , err := cp .client .Compute ().GetPrimaryVNICForInstance (ctx , * inst .Id )
86
+ vnic , err := cp .client .Compute ().GetPrimaryVNICForInstance (ctx , cp . config . Auth . CompartmentOCID , * inst .Id )
87
87
if err != nil {
88
88
return nil , errors .Wrap (err , "GetPrimaryVNICForInstance" )
89
89
}
@@ -98,7 +98,7 @@ func (cp *CloudProvider) NodeAddresses(ctx context.Context, name types.NodeName)
98
98
func (cp * CloudProvider ) NodeAddressesByProviderID (ctx context.Context , providerID string ) ([]api.NodeAddress , error ) {
99
99
glog .V (4 ).Infof ("NodeAddressesByProviderID(%q) called" , providerID )
100
100
instanceID := util .MapProviderIDToInstanceID (providerID )
101
- vnic , err := cp .client .Compute ().GetPrimaryVNICForInstance (ctx , instanceID )
101
+ vnic , err := cp .client .Compute ().GetPrimaryVNICForInstance (ctx , cp . config . Auth . CompartmentOCID , instanceID )
102
102
if err != nil {
103
103
return nil , errors .Wrap (err , "GetPrimaryVNICForInstance" )
104
104
}
@@ -112,7 +112,7 @@ func (cp *CloudProvider) ExternalID(ctx context.Context, nodeName types.NodeName
112
112
glog .V (4 ).Infof ("ExternalID(%q) called" , nodeName )
113
113
114
114
instName := mapNodeNameToInstanceName (nodeName )
115
- inst , err := cp .client .Compute ().GetInstanceByNodeName (ctx , instName )
115
+ inst , err := cp .client .Compute ().GetInstanceByNodeName (ctx , cp . config . Auth . CompartmentOCID , cp . config . VCNID , instName )
116
116
if client .IsNotFound (err ) {
117
117
glog .Infof ("Instance %q was not found. Unable to get ExternalID: %v" , instName , err )
118
118
return "" , cloudprovider .InstanceNotFound
@@ -131,7 +131,7 @@ func (cp *CloudProvider) InstanceID(ctx context.Context, nodeName types.NodeName
131
131
glog .V (4 ).Infof ("InstanceID(%q) called" , nodeName )
132
132
133
133
name := mapNodeNameToInstanceName (nodeName )
134
- inst , err := cp .client .Compute ().GetInstanceByNodeName (ctx , name )
134
+ inst , err := cp .client .Compute ().GetInstanceByNodeName (ctx , cp . config . Auth . CompartmentOCID , cp . config . VCNID , name )
135
135
if err != nil {
136
136
if client .IsNotFound (err ) {
137
137
return "" , cloudprovider .InstanceNotFound
@@ -145,7 +145,7 @@ func (cp *CloudProvider) InstanceID(ctx context.Context, nodeName types.NodeName
145
145
func (cp * CloudProvider ) InstanceType (ctx context.Context , name types.NodeName ) (string , error ) {
146
146
glog .V (4 ).Infof ("InstanceType(%q) called" , name )
147
147
148
- inst , err := cp .client .Compute ().GetInstanceByNodeName (ctx , mapNodeNameToInstanceName (name ))
148
+ inst , err := cp .client .Compute ().GetInstanceByNodeName (ctx , cp . config . Auth . CompartmentOCID , cp . config . VCNID , mapNodeNameToInstanceName (name ))
149
149
if err != nil {
150
150
return "" , errors .Wrap (err , "GetInstanceByNodeName" )
151
151
}
0 commit comments