Commit bfa8746e authored by Léo-Paul Géneau's avatar Léo-Paul Géneau 👾

software/js-drone: add subscriber's netif param

Allow subscribers' network interface to be different from the drones' one
parent 3766503c
......@@ -18,11 +18,11 @@ md5sum = ed0356dab0213a99fcd56e8a48e1c4d2
[instance-profile]
filename = instance.cfg.in
md5sum = 43e19ec3145928d79803528796eee8e0
md5sum = 578ec4c7194a64b1361de4a41200bced
[instance-default]
filename = instance-default.cfg.jinja
md5sum = 0ed9aac3b3a61c41b8a7b61ab8067c77
md5sum = 90b231a90227c86cf56c0a391a1a328d
[instance-peer]
filename = instance-peer.cfg.jinja.in
......
......@@ -25,13 +25,14 @@ config-isASimulation = {{ dumps(parameter_dict['isASimulation']) }}
{% do drone_id_list.append(id) %}
config-isADrone = {{ dumps(True) }}
config-flightScript = {{ parameter_dict['flightScript'] }}
config-netIf = {{ parameter_dict['droneNetIf'] }}
{% else -%}
{% do subscriber_id_list.append(id) %}
config-isADrone = {{ dumps(False) }}
config-flightScript = https://lab.nexedi.com/nexedi/flight-scripts/raw/api_update/subscribe.js
config-netIf = {{ parameter_dict['subscriberNetIf'] }}
{% endif -%}
config-multicastIp = {{ parameter_dict['multicastIp'] }}
config-netIf = {{ parameter_dict['netIf'] }}
{% endfor %}
[publish-connection-information]
......
......@@ -22,6 +22,12 @@
"type": "array",
"default": []
},
"droneNetIf": {
"title": "Drones Network interface",
"description": "Interface used for multicast traffic.",
"type": "string",
"default": "eth0"
},
"isASimulation": {
"title": "Set the flight as a simulation",
"description": "The option used to determine if the flight is real or if it is a simulation. This affects the context of the flight (e.g. if the take off is manual or automatic).",
......@@ -34,12 +40,6 @@
"type": "string",
"default": "ff15::1111"
},
"netIf": {
"title": "Network interface",
"description": "Interface used for multicast traffic.",
"type": "string",
"default": "eth0"
},
"flightScript": {
"title": "Script's URL of the flight",
"description": "URL of the script which will be executed for the flight. This URL must be publicly accesible so that the drone can fetch the script.",
......@@ -51,6 +51,12 @@
"description": "List of computer ID of swarms subscribers",
"type": "array",
"default": []
},
"subscriberNetIf": {
"title": "Subscribers Network interface",
"description": "Interface used for multicast traffic.",
"type": "string",
"default": "eth0"
}
}
}
......@@ -32,12 +32,13 @@ default-parameters =
{
"autopilotIp": "192.168.27.1",
"autopilotPort": 7909,
"droneNetIf": "eth0",
"flightScript": "https://lab.nexedi.com/nexedi/flight-scripts/raw/master/default.js",
"isASimulation": false,
"multicastIp": "ff15::1111",
"netIf": "eth0",
"droneGuidList": [],
"subscriberGuidList":[]
"subscriberGuidList":[],
"subscriberNetIf": "eth0"
}
[instance-default]
......
......@@ -117,8 +117,8 @@ class SubscriberTestCase(SlapOSInstanceTestCase):
return {
'_': json.dumps({
'droneGuidList': [cls.slap._computer_id],
'netIf': OPC_UA_NET_IF,
'subscriberGuidList': [cls.slap._computer_id],
'subscriberNetIf': OPC_UA_NET_IF
})
}
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment