now boards receive their location
Change-Id: I9808505e7e0d80f1e4c91788ea3ec59d90e32c56
This commit is contained in:
@@ -114,7 +114,10 @@ class ConductorEndpoint(object):
|
||||
prov.conf_registration_agent(self.ragent.wsurl)
|
||||
|
||||
prov.conf_main_agent(agent.wsurl)
|
||||
loc = objects.Location.list_by_board_uuid(ctx, board.uuid)[0]
|
||||
prov.conf_location(loc)
|
||||
board.config = prov.get_config()
|
||||
|
||||
board.status = states.OFFLINE
|
||||
board.save()
|
||||
|
||||
|
||||
@@ -75,3 +75,8 @@ class Provisioner(object):
|
||||
if 'board' not in self.config['iotronic']:
|
||||
self.config['iotronic']['board'] = {}
|
||||
self.config['iotronic']['board']['token'] = "<REGISTRATION-TOKEN>"
|
||||
|
||||
def conf_location(self, location):
|
||||
if "location" not in self.config['iotronic']['board']:
|
||||
self.config['iotronic']['board']['location'] = {}
|
||||
self.config['iotronic']['board']['location'] = location.get_geo()
|
||||
|
||||
Reference in New Issue
Block a user