Skip to content

Commit 0f08f4e

Browse files
prydieowainlewis
authored andcommitted
Use cloudprovider.NotImplemented error (#158)
Fixes: #64
1 parent a201085 commit 0f08f4e

File tree

2 files changed

+6
-6
lines changed

2 files changed

+6
-6
lines changed

pkg/oci/instances.go

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -167,14 +167,15 @@ func (cp *CloudProvider) InstanceTypeByProviderID(ctx context.Context, providerI
167167
// AddSSHKeyToAllInstances adds an SSH public key as a legal identity for all instances
168168
// expected format for the key is standard ssh-keygen format: <protocol> <blob>
169169
func (cp *CloudProvider) AddSSHKeyToAllInstances(ctx context.Context, user string, keyData []byte) error {
170-
return errors.New("unimplemented")
170+
return cloudprovider.NotImplemented
171171
}
172172

173173
// CurrentNodeName returns the name of the node we are currently running on
174174
// On most clouds (e.g. GCE) this is the hostname, so we provide the hostname
175175
func (cp *CloudProvider) CurrentNodeName(ctx context.Context, hostname string) (types.NodeName, error) {
176176
glog.V(4).Infof("CurrentNodeName(%q) called", hostname)
177-
return "", errors.New("unimplemented")
177+
return "", cloudprovider.NotImplemented
178+
178179
}
179180

180181
// InstanceExistsByProviderID returns true if the instance for the given

pkg/oci/zones.go

Lines changed: 3 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -16,13 +16,12 @@ package oci
1616

1717
import (
1818
"context"
19-
"errors"
2019
"strings"
2120

22-
"github.com/oracle/oci-cloud-controller-manager/pkg/oci/util"
23-
2421
"k8s.io/apimachinery/pkg/types"
2522
"k8s.io/kubernetes/pkg/cloudprovider"
23+
24+
"github.com/oracle/oci-cloud-controller-manager/pkg/oci/util"
2625
)
2726

2827
var _ cloudprovider.Zones = &CloudProvider{}
@@ -40,7 +39,7 @@ func mapAvailabilityDomainToFailureDomain(AD string) string {
4039
// GetZone returns the Zone containing the current failure zone and locality
4140
// region that the program is running in.
4241
func (cp *CloudProvider) GetZone(ctx context.Context) (cloudprovider.Zone, error) {
43-
return cloudprovider.Zone{}, errors.New("unimplemented")
42+
return cloudprovider.Zone{}, cloudprovider.NotImplemented
4443
}
4544

4645
// GetZoneByProviderID returns the Zone containing the current zone and

0 commit comments

Comments
 (0)