@@ -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
9496func 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" )
0 commit comments