@@ -87,7 +87,7 @@ func syncDHCPD() {
8787 klog .Fatalf ("failed to create a session with IBM cloud: %v" , err )
8888 }
8989
90- pvmclient , err := client .NewPVMClientWithEnv (c , pkg .Options .InstanceID , "" , "prod" )
90+ pvmclient , err := client .NewPVMClientWithEnv (c , pkg .Options .WorkspaceID , "" , "prod" )
9191 if err != nil {
9292 klog .Fatalf ("failed to create a PVM client: %v" , err )
9393 }
@@ -159,8 +159,8 @@ var Cmd = &cobra.Command{
159159 Long : `dhcp-sync tool is a tool populating the dhcpd.conf file from the PowerVS network and restart the dhcpd service.` ,
160160 GroupID : "dhcp" ,
161161 PreRunE : func (cmd * cobra.Command , args []string ) error {
162- if pkg .Options .InstanceID == "" {
163- return fmt .Errorf ("--instance -id is required" )
162+ if pkg .Options .WorkspaceID == "" {
163+ return fmt .Errorf ("--workspace -id is required" )
164164 }
165165 if pkg .Options .APIKey == "" {
166166 return fmt .Errorf ("api-key can't be empty, pass the token via --api-key or set IBMCLOUD_API_KEY environment variable" )
@@ -211,7 +211,9 @@ var Cmd = &cobra.Command{
211211}
212212
213213func init () {
214- Cmd .Flags ().StringVarP (& pkg .Options .InstanceID , "instance-id" , "i" , "" , "Instance ID of the PowerVS instance" )
214+ Cmd .Flags ().StringVarP (& pkg .Options .WorkspaceID , "instance-id" , "i" , "" , "Instance ID of the PowerVS instance" )
215+ Cmd .Flags ().MarkDeprecated ("instance-id" , "instance-id is deprecated, workspace-id should be used" )
216+ Cmd .Flags ().StringVarP (& pkg .Options .WorkspaceID , "workspace-id" , "w" , "" , "Workspace ID of the PowerVS instance" )
215217 Cmd .Flags ().StringVar (& networkID , "network-id" , "" , "Network ID to be monitored" )
216218 Cmd .Flags ().StringVar (& file , "file" , "/etc/dhcp/dhcpd.conf" , "DHCP conf file" )
217219 Cmd .Flags ().StringVar (& gateway , "gateway" , "" , "Override the gateway value with" )
0 commit comments