From 51b2a1aae6cc387e17009d33a96c583e7bd3ab29 Mon Sep 17 00:00:00 2001 From: csermet-ankasoft Date: Tue, 29 Aug 2023 15:37:38 +0300 Subject: [PATCH] conflict fix --- apis/zz_register.go | 6 ++++-- config/external_name.go | 16 +++++++++------- config/provider.go | 9 ++++++++- internal/controller/zz_setup.go | 4 ++++ 4 files changed, 25 insertions(+), 10 deletions(-) diff --git a/apis/zz_register.go b/apis/zz_register.go index 988cd60..dadb413 100755 --- a/apis/zz_register.go +++ b/apis/zz_register.go @@ -10,7 +10,8 @@ package apis import ( "k8s.io/apimachinery/pkg/runtime" - v1alpha1 "github.com/ankasoftco/upjet-provider-vra/apis/blueprint/v1alpha1" + v1alpha1 "github.com/ankasoftco/upjet-provider-vra/apis/blockdevice/v1alpha1" + v1alpha1blueprint "github.com/ankasoftco/upjet-provider-vra/apis/blueprint/v1alpha1" v1alpha1deployment "github.com/ankasoftco/upjet-provider-vra/apis/deployment/v1alpha1" v1alpha1fabric "github.com/ankasoftco/upjet-provider-vra/apis/fabric/v1alpha1" v1alpha1project "github.com/ankasoftco/upjet-provider-vra/apis/project/v1alpha1" @@ -22,7 +23,8 @@ func init() { // Register the types with the Scheme so the components can map objects to GroupVersionKinds and back AddToSchemes = append(AddToSchemes, v1alpha1.SchemeBuilder.AddToScheme, - v1alpha1.SchemeBuilder.AddToScheme, + v1alpha1blueprint.SchemeBuilder.AddToScheme, + v1alpha1blueprint.SchemeBuilder.AddToScheme, v1alpha1deployment.SchemeBuilder.AddToScheme, v1alpha1fabric.SchemeBuilder.AddToScheme, v1alpha1project.SchemeBuilder.AddToScheme, diff --git a/config/external_name.go b/config/external_name.go index 77870b5..2298a5a 100644 --- a/config/external_name.go +++ b/config/external_name.go @@ -10,13 +10,15 @@ import "github.com/upbound/upjet/pkg/config" // provider. var ExternalNameConfigs = map[string]config.ExternalName{ // Import requires using a randomly generated ID from provider: nl-2e21sda - "vra_project": config.IdentifierFromProvider, - "vra_blueprint": config.IdentifierFromProvider, - "vra_blueprint_version": config.IdentifierFromProvider, - "vra_deployment": config.IdentifierFromProvider, - "vra_fabric_compute": config.IdentifierFromProvider, - "vra_datastore_vsphere": config.IdentifierFromProvider, - "vra_network_vsphere": config.IdentifierFromProvider, + "vra_project": config.IdentifierFromProvider, + "vra_blueprint": config.IdentifierFromProvider, + "vra_blueprint_version": config.IdentifierFromProvider, + "vra_deployment": config.IdentifierFromProvider, + "vra_fabric_compute": config.IdentifierFromProvider, + "vra_datastore_vsphere": config.IdentifierFromProvider, + "vra_network_vsphere": config.IdentifierFromProvider, + "vra_block_device": config.IdentifierFromProvider, + "vra_block_device_snapshot": config.IdentifierFromProvider, } // ExternalNameConfigurations applies all external name configs listed in the diff --git a/config/provider.go b/config/provider.go index 18e9b42..009cf3b 100644 --- a/config/provider.go +++ b/config/provider.go @@ -8,12 +8,17 @@ import ( // Note(turkenh): we are importing this to embed provider schema document _ "embed" + blockDevice "github.com/ankasoftco/upjet-provider-vra/config/block_device" + ujconfig "github.com/upbound/upjet/pkg/config" - project "github.com/ankasoftco/upjet-provider-vra/config/project" blueprint "github.com/ankasoftco/upjet-provider-vra/config/blueprint" deployment "github.com/ankasoftco/upjet-provider-vra/config/deployment" +<<<<<<< HEAD fabric "github.com/ankasoftco/upjet-provider-vra/config/fabric" +======= + project "github.com/ankasoftco/upjet-provider-vra/config/project" +>>>>>>> a5278da (block device and block device snapshot added) ) const ( @@ -43,6 +48,8 @@ func GetProvider() *ujconfig.Provider { blueprint.Configure, deployment.Configure, fabric.Configure, + blockDevice.Configure, + blockDeviceSnapshot.Configure, } { configure(pc) } diff --git a/internal/controller/zz_setup.go b/internal/controller/zz_setup.go index 24fc747..e01610e 100755 --- a/internal/controller/zz_setup.go +++ b/internal/controller/zz_setup.go @@ -9,6 +9,8 @@ import ( "github.com/upbound/upjet/pkg/controller" + blockdevice "github.com/ankasoftco/upjet-provider-vra/internal/controller/blockdevice/blockdevice" + blockdevicesnapshot "github.com/ankasoftco/upjet-provider-vra/internal/controller/blockdevice/blockdevicesnapshot" blueprint "github.com/ankasoftco/upjet-provider-vra/internal/controller/blueprint/blueprint" version "github.com/ankasoftco/upjet-provider-vra/internal/controller/blueprint/version" deployment "github.com/ankasoftco/upjet-provider-vra/internal/controller/deployment/deployment" @@ -21,6 +23,8 @@ import ( // the supplied manager. func Setup(mgr ctrl.Manager, o controller.Options) error { for _, setup := range []func(ctrl.Manager, controller.Options) error{ + blockdevice.Setup, + blockdevicesnapshot.Setup, blueprint.Setup, version.Setup, deployment.Setup,