Skip to content

Commit a318dfc

Browse files
authored
chore: satisfy ValidationRule (#323)
## Issue Resolves <!-- Link to the github issue this PR address, ie: #123 --> ## Description <!-- Description of the changes made --> Signed-off-by: Tyler Gillson <[email protected]>
1 parent a93cb70 commit a318dfc

File tree

3 files changed

+10
-3
lines changed

3 files changed

+10
-3
lines changed

api/v1alpha1/vspherevalidator_types.go

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,8 @@
11
package v1alpha1
22

33
import (
4+
"reflect"
5+
46
metav1 "k8s.io/apimachinery/pkg/apis/meta/v1"
57

68
"github.com/validator-labs/validator-plugin-vsphere/pkg/constants"
@@ -125,6 +127,11 @@ type VsphereValidator struct {
125127
Status VsphereValidatorStatus `json:"status,omitempty"`
126128
}
127129

130+
// GetKind returns the vSphere validator's kind.
131+
func (v VsphereValidator) GetKind() string {
132+
return reflect.TypeOf(v).Name()
133+
}
134+
128135
// PluginCode returns the vSphere validator's plugin code.
129136
func (v VsphereValidator) PluginCode() string {
130137
return v.Spec.PluginCode()

go.mod

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,7 @@ require (
1111
github.com/pkg/errors v0.9.1
1212
github.com/sirupsen/logrus v1.9.3
1313
github.com/stretchr/testify v1.9.0
14-
github.com/validator-labs/validator v0.1.2
14+
github.com/validator-labs/validator v0.1.3-0.20240809205255-c05a36eebd3c
1515
github.com/vmware/govmomi v0.39.0
1616
golang.org/x/exp v0.0.0-20240808152545-0cdaa3abc0fa
1717
k8s.io/api v0.30.3

go.sum

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -143,8 +143,8 @@ github.com/stretchr/testify v1.8.0/go.mod h1:yNjHg4UonilssWZ8iaSj1OCr/vHnekPRkoO
143143
github.com/stretchr/testify v1.8.1/go.mod h1:w2LPCIKwWwSfY2zedu0+kehJoqGctiVI29o6fzry7u4=
144144
github.com/stretchr/testify v1.9.0 h1:HtqpIVDClZ4nwg75+f6Lvsy/wHu+3BoSGCbBAcpTsTg=
145145
github.com/stretchr/testify v1.9.0/go.mod h1:r2ic/lqez/lEtzL7wO/rwa5dbSLXVDPFyf8C91i36aY=
146-
github.com/validator-labs/validator v0.1.2 h1:2KqwetsZFeK5ol7Hd/VGO1Ccz8WQFVs5QwfLf8blp10=
147-
github.com/validator-labs/validator v0.1.2/go.mod h1:AdpMOk2xYjlpUjmPJ2CN6MNDFN4NLH/q4lqUziseHpU=
146+
github.com/validator-labs/validator v0.1.3-0.20240809205255-c05a36eebd3c h1:9Dy8DW7qdSQflkwiNPcBPkf/wgAOT+ddmSDvOabjnVQ=
147+
github.com/validator-labs/validator v0.1.3-0.20240809205255-c05a36eebd3c/go.mod h1:TU04WjenuJxvJI/uhRsBJRym3ysA+dvSwUs2qvnak1Q=
148148
github.com/vmware/govmomi v0.39.0 h1:soLZ08Q2zvjRSinNup8xVlw0KDDCJPPA1rIDmBhi7As=
149149
github.com/vmware/govmomi v0.39.0/go.mod h1:oHzAQ1r6152zYDGcUqeK+EO8LhKo5wjtvWZBGHws2Hc=
150150
github.com/yuin/goldmark v1.1.27/go.mod h1:3hX8gzYuyVAZsxl0MRgGTJEmQBFcNTphYh9decYSb74=

0 commit comments

Comments
 (0)