chore: more self-descriptive not-implemented errors

Our metal implementation currently has some stub methods that return a
not-implemented error; make sure the errors are unique.
This commit is contained in:
justinsb 2024-10-13 06:56:41 -04:00
parent 80e4a718c6
commit 78c72ec0d3
1 changed files with 7 additions and 7 deletions

View File

@ -44,38 +44,38 @@ func (c *Cloud) ProviderID() kops.CloudProviderID {
return kops.CloudProviderMetal return kops.CloudProviderMetal
} }
func (c *Cloud) DNS() (dnsprovider.Interface, error) { func (c *Cloud) DNS() (dnsprovider.Interface, error) {
return nil, fmt.Errorf("method not implemented") return nil, fmt.Errorf("method metal.Cloud::DNS not implemented")
} }
// FindVPCInfo looks up the specified VPC by id, returning info if found, otherwise (nil, nil). // FindVPCInfo looks up the specified VPC by id, returning info if found, otherwise (nil, nil).
func (c *Cloud) FindVPCInfo(id string) (*fi.VPCInfo, error) { func (c *Cloud) FindVPCInfo(id string) (*fi.VPCInfo, error) {
return nil, fmt.Errorf("method not implemented") return nil, fmt.Errorf("method metal.Cloud::FindVPCInfo not implemented")
} }
// DeleteInstance deletes a cloud instance. // DeleteInstance deletes a cloud instance.
func (c *Cloud) DeleteInstance(instance *cloudinstances.CloudInstance) error { func (c *Cloud) DeleteInstance(instance *cloudinstances.CloudInstance) error {
return fmt.Errorf("method not implemented") return fmt.Errorf("method metal.Cloud::DeleteInstance not implemented")
} }
// // DeregisterInstance drains a cloud instance and loadbalancers. // // DeregisterInstance drains a cloud instance and loadbalancers.
func (c *Cloud) DeregisterInstance(instance *cloudinstances.CloudInstance) error { func (c *Cloud) DeregisterInstance(instance *cloudinstances.CloudInstance) error {
return fmt.Errorf("method not implemented") return fmt.Errorf("method metal.Cloud::DeregisterInstance not implemented")
} }
// DeleteGroup deletes the cloud resources that make up a CloudInstanceGroup, including the instances. // DeleteGroup deletes the cloud resources that make up a CloudInstanceGroup, including the instances.
func (c *Cloud) DeleteGroup(group *cloudinstances.CloudInstanceGroup) error { func (c *Cloud) DeleteGroup(group *cloudinstances.CloudInstanceGroup) error {
return fmt.Errorf("method not implemented") return fmt.Errorf("method metal.Cloud::DeleteGroup not implemented")
} }
// DetachInstance causes a cloud instance to no longer be counted against the group's size limits. // DetachInstance causes a cloud instance to no longer be counted against the group's size limits.
func (c *Cloud) DetachInstance(instance *cloudinstances.CloudInstance) error { func (c *Cloud) DetachInstance(instance *cloudinstances.CloudInstance) error {
return fmt.Errorf("method not implemented") return fmt.Errorf("method metal.Cloud::DetachInstance not implemented")
} }
// GetCloudGroups returns a map of cloud instances that back a kops cluster. // GetCloudGroups returns a map of cloud instances that back a kops cluster.
// Detached instances must be returned in the NeedUpdate slice. // Detached instances must be returned in the NeedUpdate slice.
func (c *Cloud) GetCloudGroups(cluster *kops.Cluster, instancegroups []*kops.InstanceGroup, warnUnmatched bool, nodes []v1.Node) (map[string]*cloudinstances.CloudInstanceGroup, error) { func (c *Cloud) GetCloudGroups(cluster *kops.Cluster, instancegroups []*kops.InstanceGroup, warnUnmatched bool, nodes []v1.Node) (map[string]*cloudinstances.CloudInstanceGroup, error) {
return nil, fmt.Errorf("method not implemented") return nil, fmt.Errorf("method metal.Cloud::GetCloudGroups not implemented")
} }
// Region returns the cloud region bound to the cloud instance. // Region returns the cloud region bound to the cloud instance.