Skip to content

Commit 651b20d

Browse files
committed
Fix typos and structure parameter comments
Fixed some typos in the test-operator code and reordered parameter comments to ensure a consistent structure across all resource types.
1 parent 399c3fd commit 651b20d

11 files changed

+106
-102
lines changed

api/bases/test.openstack.org_ansibletests.yaml

Lines changed: 13 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -55,13 +55,13 @@ spec:
5555
type: string
5656
ansibleCollections:
5757
default: ""
58-
description: AnsibleCollections - extra ansible collections to instal
59-
in additionn to the ones exist in the requirements.yaml
58+
description: |-
59+
AnsibleCollections - extra ansible collections to install in addition
60+
to the ones existing in the requirements.yaml
6061
type: string
6162
ansibleExtraVars:
6263
default: ""
6364
description: AnsibleExtraVars - string to pass parameters to ansible
64-
using
6565
type: string
6666
ansibleGitRepo:
6767
default: ""
@@ -78,8 +78,10 @@ spec:
7878
type: string
7979
ansibleVarFiles:
8080
default: ""
81-
description: AnsibleVarFiles - interface to create ansible var files
82-
Those get added to the
81+
description: |-
82+
AnsibleVarFiles - interface to create ansible var files. Those get added
83+
to the service config dir in /etc/test_operator/<file> and passed to the
84+
ansible command using -e @/etc/test_operator/<file>
8385
type: string
8486
backoffLimit:
8587
default: 0
@@ -1334,8 +1336,9 @@ spec:
13341336
operator.
13351337
type: string
13361338
ansibleCollections:
1337-
description: AnsibleCollections - extra ansible collections
1338-
to instal in additionn to the ones exist in the requirements.yaml
1339+
description: |-
1340+
AnsibleCollections - extra ansible collections to install in addition
1341+
to the ones existing in the requirements.yaml
13391342
type: string
13401343
ansibleExtraVars:
13411344
description: AnsibleExtraVars - interface to pass parameters
@@ -1353,8 +1356,9 @@ spec:
13531356
type: string
13541357
ansibleVarFiles:
13551358
description: |-
1356-
AnsibleVarFiles - interface to create ansible var files Those get added to the
1357-
service config dir in /etc/test_operator/<file> and passed to the ansible command using -e @/etc/test_operator/<file>
1359+
AnsibleVarFiles - interface to create ansible var files. Those get added
1360+
to the service config dir in /etc/test_operator/<file> and passed to the
1361+
ansible command using -e @/etc/test_operator/<file>
13581362
type: string
13591363
backoffLimit:
13601364
default: 0

api/bases/test.openstack.org_tempests.yaml

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -1393,7 +1393,7 @@ spec:
13931393
description: Cloud that should be used for authentication
13941394
type: string
13951395
vcpus:
1396-
description: How many vcpus should be be allocated when
1396+
description: How many vcpus should be allocated when
13971397
this flavor is used
13981398
format: int64
13991399
type: integer
@@ -1584,7 +1584,7 @@ spec:
15841584
testAccounts:
15851585
default: ""
15861586
description: A content of accounts.yaml that is passed to tempest
1587-
via --test-acounts
1587+
via --test-accounts
15881588
type: string
15891589
timeout:
15901590
default: 0
@@ -1642,7 +1642,7 @@ spec:
16421642
type: array
16431643
workflow:
16441644
description: |-
1645-
Workflow - can be used to specify a multiple executions of tempest with
1645+
Workflow - can be used to specify multiple executions of tempest with
16461646
a different configuration in a single CR. Accepts a list of dictionaries
16471647
where each member of the list accepts the same values as the Tempest CR
16481648
does in the `spec`` section. Values specified using the workflow section have
@@ -1862,7 +1862,7 @@ spec:
18621862
- repository
18631863
type: object
18641864
type: array
1865-
extraImagesType:
1865+
extraImages:
18661866
description: |-
18671867
Extra images that should be downloaded inside the test pod and uploaded to
18681868
openstack.
@@ -1916,7 +1916,7 @@ spec:
19161916
description: Cloud that should be used for authentication
19171917
type: string
19181918
vcpus:
1919-
description: How many vcpus should be be allocated
1919+
description: How many vcpus should be allocated
19201920
when this flavor is used
19211921
format: int64
19221922
type: integer
@@ -2080,7 +2080,7 @@ spec:
20802080
type: boolean
20812081
testAccounts:
20822082
description: A content of accounts.yaml that is passed to
2083-
tempest via --test-acounts
2083+
tempest via --test-accounts
20842084
type: string
20852085
timeout:
20862086
description: |-

api/bases/test.openstack.org_tobikoes.yaml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1182,7 +1182,7 @@ spec:
11821182
numProcesses:
11831183
default: 4
11841184
description: Number of processes/workers used to run tobiko tests
1185-
- value 0 results in automatic decission
1185+
- value 0 results in automatic decision
11861186
type: integer
11871187
parallel:
11881188
default: false

api/v1beta1/ansibletest_types.go

Lines changed: 30 additions & 29 deletions
Original file line numberDiff line numberDiff line change
@@ -22,9 +22,6 @@ import (
2222
metav1 "k8s.io/apimachinery/pkg/apis/meta/v1"
2323
)
2424

25-
// EDIT THIS FILE! THIS IS SCAFFOLDING FOR YOU TO OWN!
26-
// NOTE: json tags are required. Any new fields you add must have json tags for the fields to be serialized.
27-
2825
// AnsibleTestSpec defines the desired state of AnsibleTest
2926
type AnsibleTestSpec struct {
3027
CommonOptions `json:",inline"`
@@ -35,66 +32,68 @@ type AnsibleTestSpec struct {
3532
// spawned using the AnsibleTest CR. https://pkg.go.dev/k8s.io/api/core/v1#ResourceRequirements
3633
Resources corev1.ResourceRequirements `json:"resources,omitempty"`
3734

38-
// +operator-sdk:csv:customresourcedefinitions:type=spec
3935
// +kubebuilder:validation:Optional
36+
// +operator-sdk:csv:customresourcedefinitions:type=spec
4037
// +kubebuilder:default:="dataplane-ansible-ssh-private-key-secret"
4138
// ComputeSSHKeySecretName is the name of the k8s secret that contains an ssh key for computes.
4239
// The key is mounted to ~/.ssh/id_ecdsa in the ansible pod
4340
ComputesSSHKeySecretName string `json:"computeSSHKeySecretName"`
4441

45-
// +operator-sdk:csv:customresourcedefinitions:type=spec
4642
// +kubebuilder:validation:Optional
43+
// +operator-sdk:csv:customresourcedefinitions:type=spec
4744
// +kubebuilder:default:=""
4845
// WorkloadSSHKeySecretName is the name of the k8s secret that contains an ssh key for the ansible workload.
4946
// The key is mounted to ~/test_keypair.key in the ansible pod
5047
WorkloadSSHKeySecretName string `json:"workloadSSHKeySecretName"`
5148

52-
// +operator-sdk:csv:customresourcedefinitions:type=spec
5349
// +kubebuilder:validation:Required
50+
// +operator-sdk:csv:customresourcedefinitions:type=spec
5451
// +kubebuilder:default:=""
5552
// AnsibleGitRepo - git repo to clone into container
5653
AnsibleGitRepo string `json:"ansibleGitRepo"`
5754

58-
// +operator-sdk:csv:customresourcedefinitions:type=spec
5955
// +kubebuilder:validation:Required
56+
// +operator-sdk:csv:customresourcedefinitions:type=spec
6057
// +kubebuilder:default:=""
6158
// AnsiblePlaybookPath - path to ansible playbook
6259
AnsiblePlaybookPath string `json:"ansiblePlaybookPath"`
6360

61+
// +kubebuilder:validation:Optional
6462
// +operator-sdk:csv:customresourcedefinitions:type=spec
65-
// +kubebuilder:validation:optional
6663
// +kubebuilder:default:=""
67-
// AnsibleCollections - extra ansible collections to instal in additionn to the ones exist in the requirements.yaml
64+
// AnsibleCollections - extra ansible collections to install in addition
65+
// to the ones existing in the requirements.yaml
6866
AnsibleCollections string `json:"ansibleCollections,omitempty"`
6967

68+
// +kubebuilder:validation:Optional
7069
// +operator-sdk:csv:customresourcedefinitions:type=spec
71-
// +kubebuilder:validation:optional
7270
// +kubebuilder:default:=""
73-
// AnsibleVarFiles - interface to create ansible var files Those get added to the
71+
// AnsibleVarFiles - interface to create ansible var files. Those get added
72+
// to the service config dir in /etc/test_operator/<file> and passed to the
73+
// ansible command using -e @/etc/test_operator/<file>
7474
AnsibleVarFiles string `json:"ansibleVarFiles,omitempty"`
7575

76+
// +kubebuilder:validation:Optional
7677
// +operator-sdk:csv:customresourcedefinitions:type=spec
77-
// +kubebuilder:validation:optional
7878
// +kubebuilder:default:=""
79-
// AnsibleExtraVars - string to pass parameters to ansible using
79+
// AnsibleExtraVars - string to pass parameters to ansible
8080
AnsibleExtraVars string `json:"ansibleExtraVars,omitempty"`
8181

82+
// +kubebuilder:validation:Optional
8283
// +operator-sdk:csv:customresourcedefinitions:type=spec
83-
// +kubebuilder:validation:optional
8484
// +kubebuilder:default:=""
8585
// AnsibleInventory - string that contains the inventory file content
8686
AnsibleInventory string `json:"ansibleInventory,omitempty"`
8787

88-
// +operator-sdk:csv:customresourcedefinitions:type=spec
8988
// +kubebuilder:validation:Optional
89+
// +operator-sdk:csv:customresourcedefinitions:type=spec
9090
// +kubebuilder:default:=false
9191
// Run ansible playbook with -vvvv
9292
Debug bool `json:"debug"`
9393

94-
// +operator-sdk:csv:customresourcedefinitions:type=spec
95-
// A parameter that contains a workflow definition.
9694
// +kubebuilder:validation:Optional
9795
// +operator-sdk:csv:customresourcedefinitions:type=spec,xDescriptors={"urn:alm:descriptor:com.tectonic.ui:number"}
96+
// A parameter that contains a workflow definition.
9897
Workflow []AnsibleTestWorkflowSpec `json:"workflow,omitempty"`
9998
}
10099

@@ -113,51 +112,53 @@ type AnsibleTestWorkflowSpec struct {
113112
// spawned using the AnsibleTest CR. https://pkg.go.dev/k8s.io/api/core/v1#ResourceRequirements
114113
Resources *corev1.ResourceRequirements `json:"resources,omitempty"`
115114

116-
// +operator-sdk:csv:customresourcedefinitions:type=spec
117115
// +kubebuilder:validation:Optional
116+
// +operator-sdk:csv:customresourcedefinitions:type=spec
118117
// ComputeSSHKeySecretName is the name of the k8s secret that contains an ssh key for computes.
119118
// The key is mounted to ~/.ssh/id_ecdsa in the ansible pod
120119
ComputesSSHKeySecretName string `json:"computeSSHKeySecretName"`
121120

122-
// +operator-sdk:csv:customresourcedefinitions:type=spec
123121
// +kubebuilder:validation:Optional
122+
// +operator-sdk:csv:customresourcedefinitions:type=spec
124123
// WorkloadSSHKeySecretName is the name of the k8s secret that contains an ssh key for the ansible workload.
125124
// The key is mounted to ~/test_keypair.key in the ansible pod
126125
WorkloadSSHKeySecretName string `json:"workloadSSHKeySecretName"`
127126

128-
// +operator-sdk:csv:customresourcedefinitions:type=spec
129127
// +kubebuilder:validation:Optional
128+
// +operator-sdk:csv:customresourcedefinitions:type=spec
130129
// AnsibleGitRepo - git repo to clone into container
131130
AnsibleGitRepo string `json:"ansibleGitRepo,omitempty"`
132131

133-
// +operator-sdk:csv:customresourcedefinitions:type=spec
134132
// +kubebuilder:validation:Optional
133+
// +operator-sdk:csv:customresourcedefinitions:type=spec
135134
// AnsiblePlaybookPath - path to ansible playbook
136135
AnsiblePlaybookPath string `json:"ansiblePlaybookPath,omitempty"`
137136

137+
// +kubebuilder:validation:Optional
138138
// +operator-sdk:csv:customresourcedefinitions:type=spec
139-
// +kubebuilder:validation:optional
140-
// AnsibleCollections - extra ansible collections to instal in additionn to the ones exist in the requirements.yaml
139+
// AnsibleCollections - extra ansible collections to install in addition
140+
// to the ones existing in the requirements.yaml
141141
AnsibleCollections string `json:"ansibleCollections,omitempty"`
142142

143+
// +kubebuilder:validation:Optional
143144
// +operator-sdk:csv:customresourcedefinitions:type=spec
144-
// +kubebuilder:validation:optional
145-
// AnsibleVarFiles - interface to create ansible var files Those get added to the
146-
// service config dir in /etc/test_operator/<file> and passed to the ansible command using -e @/etc/test_operator/<file>
145+
// AnsibleVarFiles - interface to create ansible var files. Those get added
146+
// to the service config dir in /etc/test_operator/<file> and passed to the
147+
// ansible command using -e @/etc/test_operator/<file>
147148
AnsibleVarFiles string `json:"ansibleVarFiles,omitempty"`
148149

150+
// +kubebuilder:validation:Optional
149151
// +operator-sdk:csv:customresourcedefinitions:type=spec
150-
// +kubebuilder:validation:optional
151152
// AnsibleExtraVars - interface to pass parameters to ansible using -e
152153
AnsibleExtraVars string `json:"ansibleExtraVars,omitempty"`
153154

155+
// +kubebuilder:validation:Optional
154156
// +operator-sdk:csv:customresourcedefinitions:type=spec
155-
// +kubebuilder:validation:optional
156157
// AnsibleInventory - string that contains the inventory file content
157158
AnsibleInventory string `json:"ansibleInventory,omitempty"`
158159

159-
// +operator-sdk:csv:customresourcedefinitions:type=spec
160160
// +kubebuilder:validation:Optional
161+
// +operator-sdk:csv:customresourcedefinitions:type=spec
161162
// Run ansible playbook with -vvvv
162163
Debug bool `json:"debug,omitempty"`
163164
}

0 commit comments

Comments
 (0)