Skip to content

Commit 93c4ccb

Browse files
authored
CRDBUMPER-vendor-new-api (#104)
Vendor v1alpha6 API from github.com/NearNodeFlash/nnf-sos. ACTION: If any of the code in this repo was referencing non-local APIs, the references to them may have been inadvertently modified. Verify that any non-local APIs are being referenced by their correct versions. ACTION: Begin by running "make vet". Repair any issues that it finds. Then run "make test" and continue repairing issues until the tests pass. Signed-off-by: Dean Roehrich <dean.roehrich@hpe.com>
1 parent 372fbeb commit 93c4ccb

3 files changed

Lines changed: 48 additions & 10 deletions

File tree

internal/options.go

Lines changed: 27 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,22 @@
1+
/*
2+
* Copyright 2023-2025 Hewlett Packard Enterprise Development LP
3+
* Other additional copyright holders may be indicated within.
4+
*
5+
* The entirety of this work is licensed under the Apache License,
6+
* Version 2.0 (the "License"); you may not use this file except
7+
* in compliance with the License.
8+
*
9+
* You may obtain a copy of the License at
10+
*
11+
* http://www.apache.org/licenses/LICENSE-2.0
12+
*
13+
* Unless required by applicable law or agreed to in writing, software
14+
* distributed under the License is distributed on an "AS IS" BASIS,
15+
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
16+
* See the License for the specific language governing permissions and
17+
* limitations under the License.
18+
*/
19+
120
package internal
221

322
import (
@@ -18,7 +37,7 @@ import (
1837

1938
dwsv1alpha2 "github.com/DataWorkflowServices/dws/api/v1alpha2"
2039
lusv1alpha1 "github.com/NearNodeFlash/lustre-fs-operator/api/v1alpha1"
21-
nnfv1alpha5 "github.com/NearNodeFlash/nnf-sos/api/v1alpha5"
40+
nnfv1alpha6 "github.com/NearNodeFlash/nnf-sos/api/v1alpha6"
2241

2342
"github.com/DataWorkflowServices/dws/utils/dwdparse"
2443
)
@@ -293,7 +312,7 @@ func (t *T) Prepare(ctx context.Context, k8sClient client.Client) error {
293312
By(fmt.Sprintf("Creating storage profile '%s'", o.storageProfile.name))
294313

295314
// Clone the default profile.
296-
defaultProf := &nnfv1alpha5.NnfStorageProfile{
315+
defaultProf := &nnfv1alpha6.NnfStorageProfile{
297316
ObjectMeta: metav1.ObjectMeta{
298317
Name: "default",
299318
Namespace: "nnf-system",
@@ -302,7 +321,7 @@ func (t *T) Prepare(ctx context.Context, k8sClient client.Client) error {
302321

303322
Expect(k8sClient.Get(ctx, client.ObjectKeyFromObject(defaultProf), defaultProf)).To(Succeed())
304323

305-
profile := &nnfv1alpha5.NnfStorageProfile{
324+
profile := &nnfv1alpha6.NnfStorageProfile{
306325
ObjectMeta: metav1.ObjectMeta{
307326
Name: o.storageProfile.name,
308327
Namespace: "nnf-system",
@@ -326,7 +345,7 @@ func (t *T) Prepare(ctx context.Context, k8sClient client.Client) error {
326345

327346
if o.containerProfile != nil {
328347
// Clone the provided base profile
329-
baseProfile := &nnfv1alpha5.NnfContainerProfile{
348+
baseProfile := &nnfv1alpha6.NnfContainerProfile{
330349
ObjectMeta: metav1.ObjectMeta{
331350
Name: o.containerProfile.base,
332351
Namespace: "nnf-system",
@@ -335,7 +354,7 @@ func (t *T) Prepare(ctx context.Context, k8sClient client.Client) error {
335354

336355
Expect(k8sClient.Get(ctx, client.ObjectKeyFromObject(baseProfile), baseProfile)).To(Succeed())
337356

338-
profile := &nnfv1alpha5.NnfContainerProfile{
357+
profile := &nnfv1alpha6.NnfContainerProfile{
339358
ObjectMeta: metav1.ObjectMeta{
340359
Name: o.containerProfile.name,
341360
Namespace: "nnf-system",
@@ -389,7 +408,7 @@ func (t *T) Prepare(ctx context.Context, k8sClient client.Client) error {
389408

390409
// Extract the File System Name and MGSNids from the persistent lustre instance. This
391410
// assumes an NNF Storage resource is created in the same name as the persistent instance
392-
storage := &nnfv1alpha5.NnfStorage{
411+
storage := &nnfv1alpha6.NnfStorage{
393412
ObjectMeta: metav1.ObjectMeta{
394413
Name: name,
395414
Namespace: corev1.NamespaceDefault,
@@ -526,7 +545,7 @@ func (t *T) Cleanup(ctx context.Context, k8sClient client.Client) error {
526545
if t.options.storageProfile != nil {
527546
By(fmt.Sprintf("Deleting storage profile '%s'", o.storageProfile.name))
528547

529-
profile := &nnfv1alpha5.NnfStorageProfile{
548+
profile := &nnfv1alpha6.NnfStorageProfile{
530549
ObjectMeta: metav1.ObjectMeta{
531550
Name: o.storageProfile.name,
532551
Namespace: "nnf-system",
@@ -540,7 +559,7 @@ func (t *T) Cleanup(ctx context.Context, k8sClient client.Client) error {
540559
if t.options.containerProfile != nil {
541560
By(fmt.Sprintf("Deleting container profile '%s'", o.containerProfile.name))
542561

543-
profile := &nnfv1alpha5.NnfContainerProfile{
562+
profile := &nnfv1alpha6.NnfContainerProfile{
544563
ObjectMeta: metav1.ObjectMeta{
545564
Name: o.containerProfile.name,
546565
Namespace: "nnf-system",

internal/utils.go

Lines changed: 19 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,22 @@
1+
/*
2+
* Copyright 2023-2025 Hewlett Packard Enterprise Development LP
3+
* Other additional copyright holders may be indicated within.
4+
*
5+
* The entirety of this work is licensed under the Apache License,
6+
* Version 2.0 (the "License"); you may not use this file except
7+
* in compliance with the License.
8+
*
9+
* You may obtain a copy of the License at
10+
*
11+
* http://www.apache.org/licenses/LICENSE-2.0
12+
*
13+
* Unless required by applicable law or agreed to in writing, software
14+
* distributed under the License is distributed on an "AS IS" BASIS,
15+
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
16+
* See the License for the specific language governing permissions and
17+
* limitations under the License.
18+
*/
19+
120
package internal
221

322
import (

suite_test.go

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -43,7 +43,7 @@ import (
4343

4444
dwsv1alpha2 "github.com/DataWorkflowServices/dws/api/v1alpha2"
4545
lusv1alpha1 "github.com/NearNodeFlash/lustre-fs-operator/api/v1alpha1"
46-
nnfv1alpha5 "github.com/NearNodeFlash/nnf-sos/api/v1alpha5"
46+
nnfv1alpha6 "github.com/NearNodeFlash/nnf-sos/api/v1alpha6"
4747
)
4848

4949
var (
@@ -113,7 +113,7 @@ var _ = BeforeSuite(func() {
113113
err = lusv1alpha1.AddToScheme(scheme.Scheme)
114114
Expect(err).NotTo(HaveOccurred())
115115

116-
err = nnfv1alpha5.AddToScheme(scheme.Scheme)
116+
err = nnfv1alpha6.AddToScheme(scheme.Scheme)
117117
Expect(err).NotTo(HaveOccurred())
118118

119119
By("Creating Client")

0 commit comments

Comments
 (0)