<s> """<STR_LIT>""" <EOL> import click <EOL> import SoftLayer <EOL> from SoftLayer . CLI import environment <EOL> from SoftLayer . CLI import exceptions <EOL> from SoftLayer . CLI import formatting <EOL> @ click . command ( ) <EOL> @ click . option ( '<STR_LIT>' , '<STR_LIT>' , is_flag = True , help = '<STR_LIT>' ) <EOL> @ click . option ( '<STR_LIT>' , help = '<STR_LIT>' ) <EOL> @ environment . pass_env <EOL> def cli ( env , ipv6 , test ) : <EOL> """<STR_LIT>""" <EOL> mgr = SoftLayer . NetworkManager ( env . client ) <EOL> version = <NUM_LIT:4> <EOL> if ipv6 : <EOL> version = <NUM_LIT:6> <EOL> if not ( test or env . skip_confirmations ) : <EOL> if not formatting . confirm ( "<STR_LIT>" <EOL> "<STR_LIT>" ) : <EOL> raise exceptions . CLIAbort ( '<STR_LIT>' ) <EOL> result = mgr . add_global_ip ( version = version , test_order = test ) <EOL> table = formatting . Table ( [ '<STR_LIT>' , '<STR_LIT>' ] ) <EOL> table . align [ '<STR_LIT>' ] = '<STR_LIT:r>' <EOL> table . align [ '<STR_LIT>' ] = '<STR_LIT:r>' <EOL> total = <NUM_LIT:0.0> <EOL> for price in result [ '<STR_LIT>' ] [ '<STR_LIT>' ] : <EOL> total += float ( price . get ( '<STR_LIT>' , <NUM_LIT:0.0> ) ) <EOL> rate = "<STR_LIT>" % float ( price [ '<STR_LIT>' ] ) <EOL> table . add_row ( [ price [ '<STR_LIT>' ] [ '<STR_LIT:description>' ] , rate ] ) <EOL> table . add_row ( [ '<STR_LIT>' , "<STR_LIT>" % total ] ) <EOL> env . fout ( table ) </s>
