<s> from __future__ import print_function <EOL> import os <EOL> import time <EOL> import pyrax <EOL> pyrax . set_setting ( "<STR_LIT>" , "<STR_LIT>" ) <EOL> creds_file = os . path . expanduser ( "<STR_LIT>" ) <EOL> pyrax . set_credential_file ( creds_file ) <EOL> clb = pyrax . cloud_loadbalancers <EOL> lb = clb . list ( ) [ <NUM_LIT:0> ] <EOL> print ( ) <EOL> print ( "<STR_LIT>" , lb ) <EOL> print ( ) <EOL> print ( "<STR_LIT>" , lb . nodes <EOL> ) <EOL> new_node = clb . Node ( address = "<STR_LIT>" , port = <NUM_LIT> , condition = "<STR_LIT>" ) <EOL> lb . add_nodes ( [ new_node ] ) <EOL> pyrax . utils . wait_until ( lb , "<STR_LIT:status>" , "<STR_LIT>" , interval = <NUM_LIT:1> , attempts = <NUM_LIT:30> , <EOL> verbose = True ) <EOL> print ( ) <EOL> print ( "<STR_LIT>" , lb . nodes <EOL> ) <EOL> added_node = [ node for node in lb . nodes <EOL> if node . address == new_node . address ] [ <NUM_LIT:0> ] <EOL> print ( ) <EOL> print ( "<STR_LIT>" , added_node ) <EOL> added_node . delete ( ) <EOL> pyrax . utils . wait_until ( lb , "<STR_LIT:status>" , "<STR_LIT>" , interval = <NUM_LIT:1> , attempts = <NUM_LIT:30> , <EOL> verbose = True ) <EOL> print ( ) <EOL> print ( "<STR_LIT>" , lb . nodes ) </s>
