small change for possibility of runtime mobility configuration

This commit is contained in:
Blake Harnden 2019-06-11 15:55:11 -07:00
parent a9e622c32f
commit fca79fcf94
2 changed files with 4 additions and 3 deletions

View file

@ -1269,10 +1269,11 @@ class CoreHandler(socketserver.BaseRequestHandler):
parsed_config = ConfigShim.str_to_dict(values_str)
self.session.mobility.set_model_config(node_id, object_name, parsed_config)
if self.session.state == EventTypes.RUNTIME_STATE.value and object_name == BasicRangeModel.name:
if self.session.state == EventTypes.RUNTIME_STATE.value:
try:
node = self.session.get_node(node_id)
node.updatemodel(parsed_config)
if object_name == BasicRangeModel.name:
node.updatemodel(parsed_config)
except KeyError:
logging.error("skipping mobility configuration for unknown node: %s", node_id)

View file

@ -1026,7 +1026,7 @@ class WlanNode(CoreNetwork):
def update_mobility(self, config):
if not self.mobility:
raise ValueError("no mobility set to update for node(%s)", self.id)
self.mobility.set_configs(config, node_id=self.id)
self.mobility.update_config(config)
def updatemodel(self, config):
if not self.model: