mirror of
https://github.com/netbirdio/netbird-crossplane-provider.git
synced 2026-05-22 18:44:14 -07:00
cleanup group
This commit is contained in:
@@ -29,10 +29,6 @@ import (
|
||||
// NbGroupParameters are the configurable fields of a NbGroup.
|
||||
type NbGroupParameters struct {
|
||||
Name string `json:"name"`
|
||||
|
||||
// Peers List of peers ids
|
||||
Peers *[]string `json:"peers,omitempty"`
|
||||
Resources *[]netbirdapi.Resource `json:"resources,omitempty"`
|
||||
}
|
||||
|
||||
// NbGroupObservation are the observable fields of a NbGroup.
|
||||
@@ -43,9 +39,6 @@ type NbGroupObservation struct {
|
||||
// Issued How the group was issued (api, integration, jwt)
|
||||
Issued *netbirdapi.GroupIssued `json:"issued,omitempty"`
|
||||
|
||||
// Name Group Name identifier
|
||||
Name string `json:"name"`
|
||||
|
||||
// Peers List of peers object
|
||||
Peers []netbirdapi.PeerMinimum `json:"peers,omitempty"`
|
||||
|
||||
|
||||
@@ -117,24 +117,6 @@ func (in *NbGroupObservation) DeepCopy() *NbGroupObservation {
|
||||
// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.
|
||||
func (in *NbGroupParameters) DeepCopyInto(out *NbGroupParameters) {
|
||||
*out = *in
|
||||
if in.Peers != nil {
|
||||
in, out := &in.Peers, &out.Peers
|
||||
*out = new([]string)
|
||||
if **in != nil {
|
||||
in, out := *in, *out
|
||||
*out = make([]string, len(*in))
|
||||
copy(*out, *in)
|
||||
}
|
||||
}
|
||||
if in.Resources != nil {
|
||||
in, out := &in.Resources, &out.Resources
|
||||
*out = new([]api.Resource)
|
||||
if **in != nil {
|
||||
in, out := *in, *out
|
||||
*out = make([]api.Resource, len(*in))
|
||||
copy(*out, *in)
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new NbGroupParameters.
|
||||
@@ -151,7 +133,7 @@ func (in *NbGroupParameters) DeepCopy() *NbGroupParameters {
|
||||
func (in *NbGroupSpec) DeepCopyInto(out *NbGroupSpec) {
|
||||
*out = *in
|
||||
in.ResourceSpec.DeepCopyInto(&out.ResourceSpec)
|
||||
in.ForProvider.DeepCopyInto(&out.ForProvider)
|
||||
out.ForProvider = in.ForProvider
|
||||
}
|
||||
|
||||
// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new NbGroupSpec.
|
||||
|
||||
@@ -158,7 +158,6 @@ func (c *external) Observe(ctx context.Context, mg resource.Managed) (managed.Ex
|
||||
cr.Status.AtProvider = v1alpha1.NbGroupObservation{
|
||||
Id: group.Id,
|
||||
Issued: group.Issued,
|
||||
Name: group.Name,
|
||||
Peers: group.Peers,
|
||||
PeersCount: group.PeersCount,
|
||||
Resources: group.Resources,
|
||||
@@ -196,7 +195,6 @@ func (c *external) Create(ctx context.Context, mg resource.Managed) (managed.Ext
|
||||
cr.Status.AtProvider = v1alpha1.NbGroupObservation{
|
||||
Id: group.Id,
|
||||
Issued: group.Issued,
|
||||
Name: group.Name,
|
||||
Peers: group.Peers,
|
||||
PeersCount: group.PeersCount,
|
||||
Resources: group.Resources,
|
||||
@@ -216,7 +214,7 @@ func (c *external) Update(ctx context.Context, mg resource.Managed) (managed.Ext
|
||||
return managed.ExternalUpdate{}, errors.New(errNotNbGroup)
|
||||
}
|
||||
|
||||
fmt.Printf("Updating: %+v", cr) //todo
|
||||
fmt.Printf("Updating: %+v", cr) //no fields update on group
|
||||
return managed.ExternalUpdate{
|
||||
// Optionally return any details that may be required to connect to the
|
||||
// external resource. These will be stored as the connection secret.
|
||||
|
||||
@@ -75,26 +75,6 @@ spec:
|
||||
properties:
|
||||
name:
|
||||
type: string
|
||||
peers:
|
||||
description: Peers List of peers ids
|
||||
items:
|
||||
type: string
|
||||
type: array
|
||||
resources:
|
||||
items:
|
||||
description: Resource defines model for Resource.
|
||||
properties:
|
||||
id:
|
||||
description: Id ID of the resource
|
||||
type: string
|
||||
type:
|
||||
description: ResourceType defines model for ResourceType.
|
||||
type: string
|
||||
required:
|
||||
- id
|
||||
- type
|
||||
type: object
|
||||
type: array
|
||||
required:
|
||||
- name
|
||||
type: object
|
||||
@@ -278,9 +258,6 @@ spec:
|
||||
description: Issued How the group was issued (api, integration,
|
||||
jwt)
|
||||
type: string
|
||||
name:
|
||||
description: Name Group Name identifier
|
||||
type: string
|
||||
peers:
|
||||
description: Peers List of peers object
|
||||
items:
|
||||
@@ -321,7 +298,6 @@ spec:
|
||||
type: integer
|
||||
required:
|
||||
- id
|
||||
- name
|
||||
type: object
|
||||
conditions:
|
||||
description: Conditions of the resource.
|
||||
|
||||
Reference in New Issue
Block a user