def generate_managed_section(cluster):
 addresses = list()
 for node in cluster.agent_nodes:
  if (node.private_address is not None):
   addresses.append([node.private_address, node.address])
  else:
   addresses.append(node.address)
 return {'managed': {'addresses': addresses, 'upgrade': True}}

def generate_managed_section ( cluster ) : addresses = list ( ) for node in cluster . agent_nodes : if ( node . private_address is not None ) : addresses . append ( [ node . private_address , node . address ] ) else : addresses . append ( node . address ) return { 'managed' : { 'addresses' : addresses , 'upgrade' : True } }
generate a managed configuration section for the given cluster .