added get wlan configs, made use of it in coretk, updated node context to allow wlan config during runtime

This commit is contained in:
Blake Harnden 2019-12-13 11:48:36 -08:00
parent b993fadedb
commit 9b16f272b8
5 changed files with 56 additions and 5 deletions

View file

@ -239,15 +239,17 @@ class CoreClient:
node_id, config.model, config.config, interface
)
# get wlan configurations
response = self.client.get_wlan_configs(self.session_id)
for _id in response.configs:
mapped_config = response.configs[_id]
self.wlan_configs[_id] = mapped_config.config
# save and retrieve data, needed for session nodes
for node in session.nodes:
# get node service config and file config
# get wlan configs for wlan nodes
if node.type == core_pb2.NodeType.WIRELESS_LAN:
response = self.client.get_wlan_config(self.session_id, node.id)
self.wlan_configs[node.id] = response.config
# retrieve service configurations data for default nodes
elif node.type == core_pb2.NodeType.DEFAULT:
if node.type == core_pb2.NodeType.DEFAULT:
for service in node.services:
response = self.client.get_node_service(
self.session_id, node.id, service

View file

@ -173,6 +173,8 @@ class CanvasNode:
context.add_command(label="Configure", command=self.show_config)
if NodeUtils.is_container_node(self.core_node.type):
context.add_command(label="Services", state=tk.DISABLED)
if is_wlan:
context.add_command(label="WLAN Config", command=self.show_wlan_config)
if is_wlan and self.core_node.id in self.app.core.mobility_players:
context.add_command(
label="Mobility Player", command=self.show_mobility_player