Ejemplo n.º 1
0
 def get_wlan_config(self, node_id: int) -> Dict[str, ConfigOption]:
     response = self.client.get_wlan_config(self.session.id, node_id)
     config = response.config
     logging.debug(
         "get wlan configuration from node %s, result configuration: %s",
         node_id,
         config,
     )
     return ConfigOption.from_dict(config)
Ejemplo n.º 2
0
 def get_config(self) -> Dict[str, ConfigOption]:
     try:
         session_id = self.app.core.session.id
         response = self.app.core.client.get_session_options(session_id)
         return ConfigOption.from_dict(response.config)
     except grpc.RpcError as e:
         self.app.show_grpc_exception("Get Session Options Error", e)
         self.has_error = True
         self.destroy()
Ejemplo n.º 3
0
 def get_emane_model_config(
         self,
         node_id: int,
         model: str,
         iface_id: int = None) -> Dict[str, ConfigOption]:
     if iface_id is None:
         iface_id = -1
     response = self.client.get_emane_model_config(self.session.id, node_id,
                                                   model, iface_id)
     config = response.config
     logging.debug(
         "get emane model config: node id: %s, EMANE model: %s, "
         "interface: %s, config: %s",
         node_id,
         model,
         iface_id,
         config,
     )
     return ConfigOption.from_dict(config)