Skip to content

Commit 580d4d2

Browse files
committed
remove outdated reboot wording for configure-ips
this won't be required anylonger anyway in an upcoming release.
1 parent c3a6cf3 commit 580d4d2

File tree

5 files changed

+37
-28
lines changed

5 files changed

+37
-28
lines changed

cmd/cloudNetworkPublicAdd.go

Lines changed: 16 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -31,15 +31,17 @@ var cloudNetworkPublicAddCmd = &cobra.Command{
3131
Short: "Add Public IP(s) to a Cloud Server",
3232
Long: `Add Public IP(s) to a Cloud Server.
3333
34-
Add a number of IPs to an existing Cloud Server. If the reboot flag is passed, the
35-
server will be stopped, have the new IP addresses configured, and then started.
36-
37-
When the reboot flag is not passed, the IP will be assigned to the server, but it
38-
will be up to the administrator to configure the IP address(es) within the server.
39-
`,
34+
Add a number of IPs to an existing Cloud Server. If the configure-ips flag is
35+
passed in, the IP addresses will be automatically configured within the guest
36+
operating system.
37+
38+
If the configure-ips flag is not passed, the IP addresses will be assigned, and
39+
routing will be allowed. However the IP(s) will not be automatically configured
40+
in the guest operating system. In this scenario, it will be up to the system
41+
administrator to add the IP(s) to the network configuration.`,
4042
Run: func(cmd *cobra.Command, args []string) {
4143
uniqIdFlag, _ := cmd.Flags().GetString("uniq-id")
42-
rebootFlag, _ := cmd.Flags().GetBool("reboot")
44+
configureIpsFlag, _ := cmd.Flags().GetBool("configure-ips")
4345
newIpsFlag, _ := cmd.Flags().GetInt64("new-ips")
4446

4547
validateFields := map[interface{}]interface{}{
@@ -54,8 +56,8 @@ will be up to the administrator to configure the IP address(es) within the serve
5456
}
5557

5658
apiArgs := map[string]interface{}{
57-
"reboot": rebootFlag,
58-
"uniq_id": uniqIdFlag,
59+
"configure_ips": configureIpsFlag,
60+
"uniq_id": uniqIdFlag,
5961
}
6062
if newIpsFlag != 0 {
6163
apiArgs["ip_count"] = newIpsFlag
@@ -83,19 +85,19 @@ will be up to the administrator to configure the IP address(es) within the serve
8385

8486
fmt.Printf("Adding [%s] to Cloud Server\n", details.Adding)
8587

86-
if rebootFlag {
87-
fmt.Println("Server will be rebooted and IP(s) automatically configured.")
88+
if configureIpsFlag {
89+
fmt.Println("IP(s) will be automatically configured.")
8890
} else {
89-
fmt.Println("Server will not be rebooted. IP's will need to be manually configured.")
91+
fmt.Println("IP(s) will need to be manually configured.")
9092
}
9193
},
9294
}
9395

9496
func init() {
9597
cloudNetworkPublicCmd.AddCommand(cloudNetworkPublicAddCmd)
9698
cloudNetworkPublicAddCmd.Flags().String("uniq-id", "", "uniq-id of the Cloud Server")
97-
cloudNetworkPublicAddCmd.Flags().Bool("reboot", false,
98-
"wheter or not to automatically configure the new IP address(es) in the server (requires reboot)")
99+
cloudNetworkPublicAddCmd.Flags().Bool("configure-ips", false,
100+
"wheter or not to automatically configure the new IP address(es) in the server")
99101
cloudNetworkPublicAddCmd.Flags().Int64("new-ips", 0, "amount of new ips to (randomly) grab")
100102
cloudNetworkPublicAddCmd.Flags().StringSliceVar(&cloudNetworkPublicAddCmdPoolIpsFlag, "pool-ips", []string{},
101103
"ips from your IP Pool separated by ',' to assign to the Cloud Server")

cmd/cloudNetworkPublicRemove.go

Lines changed: 18 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -31,18 +31,18 @@ var cloudNetworkPublicRemoveCmd = &cobra.Command{
3131
Short: "Remove Public IP(s) from a Cloud Server",
3232
Long: `Remove Public IP(s) from a Cloud Server.
3333
34-
Remove specific Public IP(s) from a Cloud Server. If the reboot flag is passed in, the machine
35-
will be stopped, have the old IP addresses removed, and then started.
34+
Remove specific Public IP(s) from a Cloud Server. If the configure-ips flag is passed in,
35+
the IP addresses given will also be automatically removed from the guest operating system.
3636
37-
If the reboot flag is not passed, the IP will be unassigned, and you will no longer be able
38-
to route the IP. However the machine will not be shutdown to remove it from its network
39-
configuration. It will be up to the administrator to remove the IP from the servers network
40-
configuration.
37+
If the configure-ips flag is not passed, the IP will be unassigned, and you will no longer
38+
be able to route the IP. However the IP(s) will still be set in the guest operating system.
39+
In this scenario, it will be up to the system administrator to remove the IP(s) from the
40+
network configuration.
4141
4242
Note that you cannot remove the Cloud Servers primary ip with this command.`,
4343
Run: func(cmd *cobra.Command, args []string) {
4444
uniqIdFlag, _ := cmd.Flags().GetString("uniq-id")
45-
rebootFlag, _ := cmd.Flags().GetBool("reboot")
45+
configureIpsFlag, _ := cmd.Flags().GetBool("configure-ips")
4646

4747
validateFields := map[interface{}]interface{}{
4848
uniqIdFlag: "UniqId",
@@ -52,8 +52,8 @@ Note that you cannot remove the Cloud Servers primary ip with this command.`,
5252
}
5353

5454
apiArgs := map[string]interface{}{
55-
"reboot": rebootFlag,
56-
"uniq_id": uniqIdFlag,
55+
"configure_ips": configureIpsFlag,
56+
"uniq_id": uniqIdFlag,
5757
}
5858

5959
for _, ip := range cloudNetworkPublicRemoveCmdIpsFlag {
@@ -73,15 +73,22 @@ Note that you cannot remove the Cloud Servers primary ip with this command.`,
7373
}
7474

7575
fmt.Printf("Removing [%s] from Cloud Server\n", details.Removing)
76+
77+
if configureIpsFlag {
78+
fmt.Println("IP(s) will be automatically removed from the network configuration.")
79+
} else {
80+
fmt.Println("IP(s) will need to be manually removed from the network configuration.")
81+
}
82+
7683
}
7784
},
7885
}
7986

8087
func init() {
8188
cloudNetworkPublicCmd.AddCommand(cloudNetworkPublicRemoveCmd)
8289
cloudNetworkPublicRemoveCmd.Flags().String("uniq-id", "", "uniq-id of the Cloud Server")
83-
cloudNetworkPublicRemoveCmd.Flags().Bool("reboot", false,
84-
"whether or not to automatically remove the IP address(es) in the server config (requires reboot)")
90+
cloudNetworkPublicRemoveCmd.Flags().Bool("configure-ips", false,
91+
"whether or not to automatically remove the IP address(es) in the server config")
8592
cloudNetworkPublicRemoveCmd.Flags().StringSliceVar(&cloudNetworkPublicRemoveCmdIpsFlag, "ips", []string{},
8693
"ips separated by ',' to remove from the Cloud Server")
8794

cmd/cloudServerBlockStorageOptimized.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -32,7 +32,7 @@ purposely runs very tight. To work around this we can reduce the RAM allocated
3232
to the Cloud Server to give more to the hypervisor. We call this Cloud Block
3333
Storage Optimized.
3434
35-
Enabling or disabling Cloud Block Storage will cause your Cloud Server to reboot.
35+
Enabling or disabling Cloud Block Storage Optimized will cause your Cloud Server to reboot.
3636
3737
For a full list of capabilities, please refer to the "Available Commands" section.`,
3838

cmd/cloudServerBlockStorageOptimizedDisable.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -35,7 +35,7 @@ purposely runs very tight. To work around this we can reduce the RAM allocated
3535
to the Cloud Server to give more to the hypervisor. We call this Cloud Block
3636
Storage Optimized.
3737
38-
Disabling Cloud Block Storage will cause your Cloud Server to reboot.`,
38+
Disabling Cloud Block Storage Optimized will cause your Cloud Server to reboot.`,
3939

4040
Run: func(cmd *cobra.Command, args []string) {
4141
uniqIdFlag, _ := cmd.Flags().GetString("uniq-id")

cmd/cloudServerBlockStorageOptimizedEnable.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -35,7 +35,7 @@ purposely runs very tight. To work around this we can reduce the RAM allocated
3535
to the Cloud Server to give more to the hypervisor. We call this Cloud Block
3636
Storage Optimized.
3737
38-
Enabling Cloud Block Storage will cause your Cloud Server to reboot.`,
38+
Enabling Cloud Block Storage Optimized will cause your Cloud Server to reboot.`,
3939

4040
Run: func(cmd *cobra.Command, args []string) {
4141
uniqIdFlag, _ := cmd.Flags().GetString("uniq-id")

0 commit comments

Comments
 (0)