diff --git a/cmd/capibmadm/cmd/powervs/port/create.go b/cmd/capibmadm/cmd/powervs/port/create.go index 3bec9c573..6a541d4c5 100644 --- a/cmd/capibmadm/cmd/powervs/port/create.go +++ b/cmd/capibmadm/cmd/powervs/port/create.go @@ -36,7 +36,7 @@ import ( ) type portCreateOptions struct { - networkID string + network string ipAddress string description string } @@ -53,7 +53,7 @@ capibmadm powervs port create --network --description } var portCreateOption portCreateOptions - cmd.Flags().StringVar(&portCreateOption.networkID, "network", "", "Network ID/ name on which port is to be created (Required)") + cmd.Flags().StringVar(&portCreateOption.network, "network", "", "Network ID/ name on which port is to be created (Required)") cmd.Flags().StringVar(&portCreateOption.ipAddress, "ip-address", "", "IP Address to be assigned to the port") cmd.Flags().StringVar(&portCreateOption.description, "description", "", "Description of the port") cmd.RunE = func(cmd *cobra.Command, args []string) error { @@ -69,7 +69,7 @@ capibmadm powervs port create --network --description func createPort(ctx context.Context, portCreateOption portCreateOptions) error { logger := log.Log - logger.Info("Creating Port ", "Network ID/Name", portCreateOption.networkID, "IP Address", portCreateOption.ipAddress, "Description", portCreateOption.description, "service-instance-id", options.GlobalOptions.ServiceInstanceID, "zone", options.GlobalOptions.PowerVSZone) + logger.Info("Creating Port ", "Network ID/Name", portCreateOption.network, "IP Address", portCreateOption.ipAddress, "Description", portCreateOption.description, "service-instance-id", options.GlobalOptions.ServiceInstanceID, "zone", options.GlobalOptions.PowerVSZone) accountID, err := utils.GetAccountID(ctx, iam.GetIAMAuth()) if err != nil { return err @@ -81,7 +81,7 @@ func createPort(ctx context.Context, portCreateOption portCreateOptions) error { networkClient := client.NewIBMPINetworkClient(ctx, session, options.GlobalOptions.ServiceInstanceID) - network, err := networkClient.Get(portCreateOption.networkID) + network, err := networkClient.Get(portCreateOption.network) if err != nil { return err } diff --git a/cmd/capibmadm/cmd/powervs/port/doc.go b/cmd/capibmadm/cmd/powervs/port/doc.go deleted file mode 100644 index 0b3aba9ff..000000000 --- a/cmd/capibmadm/cmd/powervs/port/doc.go +++ /dev/null @@ -1,18 +0,0 @@ -/* -Copyright 2023 The Kubernetes Authors. - -Licensed under the Apache License, Version 2.0 (the "License"); -you may not use this file except in compliance with the License. -You may obtain a copy of the License at - - http://www.apache.org/licenses/LICENSE-2.0 - -Unless required by applicable law or agreed to in writing, software -distributed under the License is distributed on an "AS IS" BASIS, -WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -See the License for the specific language governing permissions and -limitations under the License. -*/ - -// Package port contains the commands to operate on PowerVS Port resources. -package port diff --git a/cmd/capibmadm/cmd/powervs/port/port.go b/cmd/capibmadm/cmd/powervs/port/port.go index b506bfd36..4d975c280 100644 --- a/cmd/capibmadm/cmd/powervs/port/port.go +++ b/cmd/capibmadm/cmd/powervs/port/port.go @@ -14,6 +14,7 @@ See the License for the specific language governing permissions and limitations under the License. */ +// Package port contains the commands to operate on PowerVS Port resources. package port import (