Add proper client for nailgun in fsclient.py

This commit is contained in:
Dmitry Shulyak 2015-11-11 19:01:38 +02:00
parent e2d61fd55c
commit fa03f07380
2 changed files with 12 additions and 4 deletions

View File

@ -18,6 +18,12 @@ solar:
links: links:
- riak - riak
- redis - redis
# docker run --name solar -d -v /root/solar/solar:/solar -v /root/solar/solard:/solard -v /root/solar/templates:/vagrant/templates \
# -v /root/solar/resources:/vagrant/resources -v /root/solar/f2s:/vagrant/f2s \
# -v /var/lib/fuel:/var/lib/fuel -v /root/.config/fuel/fuel_client.yaml:/root/.config/fuel/fuel_client.yaml \
# --link=riak:riak --link=redis:redis --name solar solarproject/solar-celery:f2s
riak: riak:
image: tutum/riak image: tutum/riak
ports: ports:

View File

@ -15,13 +15,15 @@ class NailgunSource(object):
def nodes(self, uids): def nodes(self, uids):
from fuelclient.objects.node import Node from fuelclient.objects.node import Node
nodes_obj = map(Node, nodes) nodes_obj = map(Node, nodes)
return [] return [str(n.data['id']), str(n.data['ip']), str(n.data['cluster'])]
def roles(self, roles): def roles(self, uid):
return [] from fuelclient.objects.node import Node
node = Node(uid)
return node.data['roles'] + node.data['pending_roles']
def master(self): def master(self):
return 'master', '' return 'master', '10.20.0.2'
class DumbSource(object): class DumbSource(object):