Loading src/common/tools/descriptor/Loader.py +14 −4 Original line number Diff line number Diff line Loading @@ -85,6 +85,7 @@ class DescriptorLoader: service_client : Optional[ServiceClient] = None, slice_client : Optional[SliceClient] = None ) -> None: if (descriptors is None) == (descriptors_file is None): # pylint: disable=broad-exception-raised raise Exception('Exactly one of "descriptors" or "descriptors_file" is required') if descriptors_file is not None: Loading Loading @@ -238,8 +239,13 @@ class DescriptorLoader: self._process_descr('service', 'add', self.__ctx_cli.SetService, Service, self.__services ) self._process_descr('slice', 'add', self.__ctx_cli.SetSlice, Slice, self.__slices ) self._process_descr('connection', 'add', self.__ctx_cli.SetConnection, Connection, self.__connections ) self._process_descr('context', 'update', self.__ctx_cli.SetContext, Context, self.__contexts ) self._process_descr('topology', 'update', self.__ctx_cli.SetTopology, Topology, self.__topologies ) # Update context and topology is useless: # - devices and links are assigned to topologies automatically by Context component # - topologies, services, and slices are assigned to contexts automatically by Context component #self._process_descr('context', 'update', self.__ctx_cli.SetContext, Context, self.__contexts ) #self._process_descr('topology', 'update', self.__ctx_cli.SetTopology, Topology, self.__topologies ) #self.__ctx_cli.close() def _load_normal_mode(self) -> None: Loading @@ -265,8 +271,12 @@ class DescriptorLoader: self._process_descr('service', 'update', self.__svc_cli.UpdateService, Service, self.__services ) self._process_descr('slice', 'add', self.__slc_cli.CreateSlice, Slice, self.__slices_add ) self._process_descr('slice', 'update', self.__slc_cli.UpdateSlice, Slice, self.__slices ) self._process_descr('context', 'update', self.__ctx_cli.SetContext, Context, self.__contexts ) self._process_descr('topology', 'update', self.__ctx_cli.SetTopology, Topology, self.__topologies ) # Update context and topology is useless: # - devices and links are assigned to topologies automatically by Context component # - topologies, services, and slices are assigned to contexts automatically by Context component #self._process_descr('context', 'update', self.__ctx_cli.SetContext, Context, self.__contexts ) #self._process_descr('topology', 'update', self.__ctx_cli.SetTopology, Topology, self.__topologies ) #self.__slc_cli.close() #self.__svc_cli.close() Loading Loading
src/common/tools/descriptor/Loader.py +14 −4 Original line number Diff line number Diff line Loading @@ -85,6 +85,7 @@ class DescriptorLoader: service_client : Optional[ServiceClient] = None, slice_client : Optional[SliceClient] = None ) -> None: if (descriptors is None) == (descriptors_file is None): # pylint: disable=broad-exception-raised raise Exception('Exactly one of "descriptors" or "descriptors_file" is required') if descriptors_file is not None: Loading Loading @@ -238,8 +239,13 @@ class DescriptorLoader: self._process_descr('service', 'add', self.__ctx_cli.SetService, Service, self.__services ) self._process_descr('slice', 'add', self.__ctx_cli.SetSlice, Slice, self.__slices ) self._process_descr('connection', 'add', self.__ctx_cli.SetConnection, Connection, self.__connections ) self._process_descr('context', 'update', self.__ctx_cli.SetContext, Context, self.__contexts ) self._process_descr('topology', 'update', self.__ctx_cli.SetTopology, Topology, self.__topologies ) # Update context and topology is useless: # - devices and links are assigned to topologies automatically by Context component # - topologies, services, and slices are assigned to contexts automatically by Context component #self._process_descr('context', 'update', self.__ctx_cli.SetContext, Context, self.__contexts ) #self._process_descr('topology', 'update', self.__ctx_cli.SetTopology, Topology, self.__topologies ) #self.__ctx_cli.close() def _load_normal_mode(self) -> None: Loading @@ -265,8 +271,12 @@ class DescriptorLoader: self._process_descr('service', 'update', self.__svc_cli.UpdateService, Service, self.__services ) self._process_descr('slice', 'add', self.__slc_cli.CreateSlice, Slice, self.__slices_add ) self._process_descr('slice', 'update', self.__slc_cli.UpdateSlice, Slice, self.__slices ) self._process_descr('context', 'update', self.__ctx_cli.SetContext, Context, self.__contexts ) self._process_descr('topology', 'update', self.__ctx_cli.SetTopology, Topology, self.__topologies ) # Update context and topology is useless: # - devices and links are assigned to topologies automatically by Context component # - topologies, services, and slices are assigned to contexts automatically by Context component #self._process_descr('context', 'update', self.__ctx_cli.SetContext, Context, self.__contexts ) #self._process_descr('topology', 'update', self.__ctx_cli.SetTopology, Topology, self.__topologies ) #self.__slc_cli.close() #self.__svc_cli.close() Loading