blob: 76dedcd2b3fd6d1d167d1d6012245cec2e7377b6 [file] [log] [blame]
Yulia Portnova21289b22015-03-18 15:21:43 +02001import node
Yulia Portnova3556a062015-03-17 16:30:11 +02002import fuel_rest_api
3
4
5def discover_fuel_nodes(root_url, credentials):
6 """Discover Fuel nodes"""
7 connection = fuel_rest_api.KeystoneAuth(root_url, credentials)
8 fi = fuel_rest_api.FuelInfo(connection)
9
Yulia Portnova21289b22015-03-18 15:21:43 +020010 return [node.Node(n.ip, n.get_roles()) for n in fi.nodes]