Skip to content

Commit

Permalink
test
Browse files Browse the repository at this point in the history
  • Loading branch information
gran-vmv committed Aug 19, 2024
1 parent ccb9ddc commit e3c4e61
Showing 1 changed file with 8 additions and 8 deletions.
16 changes: 8 additions & 8 deletions pkg/controllers/subnetport/subnetport_controller.go
Original file line number Diff line number Diff line change
Expand Up @@ -94,16 +94,16 @@ func (r *SubnetPortReconciler) Reconcile(ctx context.Context, req ctrl.Request)
log.Error(err, "failed to get NSX resource path from subnet", "subnetport", subnetPort)
return common.ResultRequeue, err
}
labels, err := r.getLabelsFromVirtualMachine(ctx, subnetPort)
if err != nil {
log.Error(err, "failed to get labels from virtualmachine", "subnetPort.Name", subnetPort.Name, "subnetPort.UID", subnetPort.UID)
return common.ResultRequeue, err
}
//labels, err := r.getLabelsFromVirtualMachine(ctx, subnetPort)
//if err != nil {
// log.Error(err, "failed to get labels from virtualmachine", "subnetPort.Name", subnetPort.Name, "subnetPort.UID", subnetPort.UID)
// return common.ResultRequeue, err
//}
nsxSubnet, err := r.SubnetService.GetSubnetByPath(nsxSubnetPath)
if err != nil {
return common.ResultRequeue, err
}
nsxSubnetPortState, err := r.SubnetPortService.CreateOrUpdateSubnetPort(subnetPort, nsxSubnet, "", labels)
nsxSubnetPortState, err := r.SubnetPortService.CreateOrUpdateSubnetPort(subnetPort, nsxSubnet, "", nil)
if err != nil {
log.Error(err, "failed to create or update NSX subnet port, would retry exponentially", "subnetport", req.NamespacedName)
updateFail(r, &ctx, subnetPort, &err)
Expand Down Expand Up @@ -503,7 +503,7 @@ func (r *SubnetPortReconciler) addressBindingMapFunc(ctx context.Context, obj cl
}
if ab.Spec.InterfaceName == "" {
if len(spList.Items) == 1 {
log.V(1).Info("Enqueue SubnetPort for default AddressBinding", "namespace", ab.Namespace, "name", ab.Name, "SubnetPortName", spList.Items[0].Name, "VM", ab.Spec.VMName)
log.Info("Enqueue SubnetPort for default AddressBinding", "namespace", ab.Namespace, "name", ab.Name, "SubnetPortName", spList.Items[0].Name, "VM", ab.Spec.VMName)
return []reconcile.Request{{
NamespacedName: types.NamespacedName{
Name: spList.Items[0].Name,
Expand All @@ -522,7 +522,7 @@ func (r *SubnetPortReconciler) addressBindingMapFunc(ctx context.Context, obj cl
continue
}
if ab.Spec.InterfaceName == port {
log.V(1).Info("Enqueue SubnetPort for AddressBinding", "namespace", ab.Namespace, "name", ab.Name, "SubnetPortName", spList.Items[0].Name, "VM", ab.Spec.VMName, "port", port)
log.Info("Enqueue SubnetPort for AddressBinding", "namespace", ab.Namespace, "name", ab.Name, "SubnetPortName", spList.Items[0].Name, "VM", ab.Spec.VMName, "port", port)

return []reconcile.Request{{
NamespacedName: types.NamespacedName{
Expand Down

0 comments on commit e3c4e61

Please sign in to comment.