@@ -38,7 +38,7 @@ import (
38
38
"k8s.io/kubernetes/test/e2e/framework"
39
39
)
40
40
41
- // getSvcCountAndComputeClusterPath method is used to get number of clusters and it's computeCluster path
41
+ // GetSvcCountAndComputeClusterPath method is used to get number of clusters and it's computeCluster path
42
42
func GetSvcCountAndComputeClusterPath (e2eTestConfig * config.E2eTestConfig ) (int , []string , error ) {
43
43
computeClusterPath := vcutil .GovcLoginCmd (e2eTestConfig ) + "govc namespace.cluster.ls"
44
44
framework .Logf ("To get number of compute cluster and it's path - command : %s" , computeClusterPath )
@@ -53,7 +53,7 @@ func GetSvcCountAndComputeClusterPath(e2eTestConfig *config.E2eTestConfig) (int,
53
53
return len (listPath ), listPath , nil
54
54
}
55
55
56
- // mountNfsDatastoreOnClusterOrHost method is used to add a new datastore to cluster
56
+ // MountNfsDatastoreOnClusterOrHost method is used to add a new datastore to cluster
57
57
func MountNfsDatastoreOnClusterOrHost (e2eTestConfig * config.E2eTestConfig , datastoreName string , datastoreIP string ,
58
58
clusterPath string ) error {
59
59
mountDsOnCluster := vcutil .GovcLoginCmd (e2eTestConfig ) + "govc datastore.create -type nfs -name " + datastoreName +
@@ -83,7 +83,7 @@ func UnMountNfsDatastoreFromClusterOrHost(e2eTestConfig *config.E2eTestConfig, d
83
83
return nil
84
84
}
85
85
86
- // verifyPermissionForWcpStorageUser method is used to check permission of service account user
86
+ // VerifyPermissionForWcpStorageUser method is used to check permission of service account user
87
87
func VerifyPermissionForWcpStorageUser (ctx context.Context , e2eTestConfig * config.E2eTestConfig , entity string ,
88
88
path string , serviceAccountUser string , role string ) (bool , error ) {
89
89
var permissionCheckSvcUser string = vcutil .GovcLoginCmd (e2eTestConfig )
@@ -119,14 +119,10 @@ func VerifyPermissionForWcpStorageUser(ctx context.Context, e2eTestConfig *confi
119
119
return true , waitErr
120
120
}
121
121
122
- // isAlarmPresentOnDatacenter method is used to check if alarm is generated on a dataCenter
122
+ // IsAlarmPresentOnDatacenter method is used to check if alarm is generated on a dataCenter
123
123
func IsAlarmPresentOnDatacenter (ctx context.Context , e2eTestConfig * config.E2eTestConfig , datacenter string ,
124
124
alarmToVerify string , alarmShouldExists bool ) (bool , error ) {
125
125
alarmCmd := vcutil .GovcLoginCmd (e2eTestConfig ) + "govc alarms " + datacenter
126
- // alarmCmd := vcutil.GovcLoginCmd(e2eTestConfig) +
127
- // fmt.Sprintf("govc alarms -n='%s' ", alarmToVerify) +
128
- // datacenter
129
-
130
126
framework .Logf ("Get alarms from datacenter - command : %s" , alarmCmd )
131
127
waitErr := wait .PollUntilContextTimeout (ctx , constants .HealthStatusPollInterval , constants .PollTimeoutSixMin , true ,
132
128
func (ctx context.Context ) (bool , error ) {
@@ -170,7 +166,7 @@ func IsAlarmPresentOnDatacenter(ctx context.Context, e2eTestConfig *config.E2eTe
170
166
return true , waitErr
171
167
}
172
168
173
- // removeEsxiHostFromCluster method is used to remove esxi hosts from cluster
169
+ // RemoveEsxiHostFromCluster method is used to remove esxi hosts from cluster
174
170
func RemoveEsxiHostFromCluster (e2eTestConfig * config.E2eTestConfig , datacenter string , cluster string ,
175
171
hostIP string ) (bool , error ) {
176
172
removeHostFromCluster := vcutil .GovcLoginCmd (e2eTestConfig ) + "govc object.mv /" + datacenter + "/host/" + cluster +
@@ -185,7 +181,7 @@ func RemoveEsxiHostFromCluster(e2eTestConfig *config.E2eTestConfig, datacenter s
185
181
return true , nil
186
182
}
187
183
188
- // moveHostToCluster method is used to move a host to cluster
184
+ // MoveHostToCluster method is used to move a host to cluster
189
185
func MoveHostToCluster (e2eTestConfig * config.E2eTestConfig , clusterPath string , hostIP string ) error {
190
186
moveHostToCluster := vcutil .GovcLoginCmd (e2eTestConfig ) + "govc cluster.mv -cluster " + clusterPath + " " + hostIP
191
187
framework .Logf ("Move a host to cluster command : %s" , moveHostToCluster )
@@ -198,7 +194,7 @@ func MoveHostToCluster(e2eTestConfig *config.E2eTestConfig, clusterPath string,
198
194
return nil
199
195
}
200
196
201
- // getVcSessionIDsforSupervisor method returns list of vc session id for a supervisor id and returns error if any
197
+ // GetVcSessionIDsforSupervisor method returns list of vc session id for a supervisor id and returns error if any
202
198
func GetVcSessionIDsforSupervisor (e2eTestConfig * config.E2eTestConfig , supervisorId string ) ([]string , error ) {
203
199
getSessionId := vcutil .GovcLoginCmd (e2eTestConfig ) + "govc session.ls | grep 'csi-useragent' | grep '" +
204
200
supervisorId + "' | awk '{print $1}'"
@@ -212,7 +208,7 @@ func GetVcSessionIDsforSupervisor(e2eTestConfig *config.E2eTestConfig, superviso
212
208
return sessionIds , nil
213
209
}
214
210
215
- // killVcSessionIDs remove vc session id for a supervisor cluster
211
+ // KillVcSessionIDs remove vc session id for a supervisor cluster
216
212
func KillVcSessionIDs (e2eTestConfig * config.E2eTestConfig , sessionIds []string ) error {
217
213
var govcLogin string = vcutil .GovcLoginCmd (e2eTestConfig )
218
214
for _ , sessionId := range sessionIds {
@@ -228,7 +224,7 @@ func KillVcSessionIDs(e2eTestConfig *config.E2eTestConfig, sessionIds []string)
228
224
return nil
229
225
}
230
226
231
- // getSvcConfigSecretData returns data obtained fom csi config secret
227
+ // GetSvcConfigSecretData returns data obtained fom csi config secret
232
228
// in namespace where CSI is deployed
233
229
func GetSvcConfigSecretData (client clientset.Interface , ctx context.Context , e2eTestConfig * config.E2eTestConfig ,
234
230
csiNamespace string ) (config.E2eTestConfig , error ) {
@@ -246,7 +242,7 @@ func GetSvcConfigSecretData(client clientset.Interface, ctx context.Context, e2e
246
242
return vsphereCfg , nil
247
243
}
248
244
249
- // getDatastoreNamesFromDCs method is used to fetch datastore details from a multi-supervisor testbed
245
+ // GetDatastoreNamesFromDCs method is used to fetch datastore details from a multi-supervisor testbed
250
246
func GetDatastoreNamesFromDCs (sshClientConfig * ssh.ClientConfig , e2eTestConfig * config.E2eTestConfig ,
251
247
dataCenters []* object.Datacenter ) ([]string , error ) {
252
248
var dsList , datastores []string
@@ -271,7 +267,7 @@ func GetDatastoreNamesFromDCs(sshClientConfig *ssh.ClientConfig, e2eTestConfig *
271
267
return datastores , nil
272
268
}
273
269
274
- // waitAndCompareSessionIDList method is used to match new session ids with old session ids
270
+ // WaitAndCompareSessionIDList method is used to match new session ids with old session ids
275
271
func WaitAndCompareSessionIDList (ctx context.Context , e2eTestConfig * config.E2eTestConfig , supervisorId string ,
276
272
oldSessionIds []string ) (bool , error ) {
277
273
var newSessionIds []string
0 commit comments