@@ -29,15 +29,15 @@ def parse_proto(ctx, param, value):
2929@click .option ('--method' , '-m' , help = "Balancing Method." , default = 'ROUNDROBIN' , show_default = True ,
3030 type = click .Choice (['ROUNDROBIN' , 'LEASTCONNECTION' , 'WEIGHTED_RR' ]))
3131@click .option ('--session' , '-s' , required = True ,
32- help = "Session stickiness type. Valid values are “ SOURCE_IP” “ HTTP_COOKIE” " )
33- @click .option ('--max' , help = "Use a Public to Public loadbalancer." )
32+ help = "Session stickiness type. Valid values are SOURCE_IP or HTTP_COOKIE " )
33+ @click .option ('--max' , help = "Max Connections setting" , type = int )
3434@environment .pass_env
3535def cli (env , identifier , ** args ):
3636 """Edit a load balancer protocol."""
3737
3838 mgr = SoftLayer .LoadBalancerManager (env .client )
3939
40- uuid_lb = mgr .get_lb (identifier )[ 'uuid' ]
40+ uuid = mgr .get_lb_uuid (identifier )
4141
4242 backend = args .get ('backend' )
4343 frontend = args .get ('frontend' )
@@ -53,15 +53,15 @@ def cli(env, identifier, **args):
5353 }
5454 ]
5555 protocol_configurations [0 ]['listenerUuid' ] = args .get ('uuid' )
56- protocol = mgr .add_protocols (uuid_lb , protocol_configurations )
56+ protocol = mgr .add_protocols (uuid , protocol_configurations )
5757
5858 table = formatting .KeyValueTable (['name' , 'value' ])
5959 table .align ['name' ] = 'r'
6060 table .align ['value' ] = 'l'
6161 table .add_row (['Id' , protocol .get ('id' )])
6262 table .add_row (['UUI' , protocol .get ('uuid' )])
6363 table .add_row (['Address' , protocol .get ('address' )])
64- table .add_row (['Type' , SoftLayer . LoadBalancerManager . TYPE . get (protocol .get ('type' ))])
64+ table .add_row (['Type' , mgr . get_lb_type (protocol .get ('type' ))])
6565 table .add_row (['Description' , protocol .get ('description' )])
6666
6767 env .fout (table )
0 commit comments