![]() It has the name attribute which identify the cache policy name and keyworded arguments specific to the policy shortest_path : dict of dict, optional The all-pair shortest paths of the network """ # Filter inputs if not isinstance ( topology, fnss. """ def _init_ ( self, topology, cache_policy, shortest_path = None ): """Constructor Parameters - topology : fnss.Topology The topology object cache_policy : dict or Tree cache policy descriptor. This object should never be edited by strategies directly, but only through calls to the network controller. class NetworkModel ( object ): """Models the internal state of the network. getLogger ( 'orchestration' ) def symmetrify_paths ( shortest_paths ): """Make paths symmetric Given a dictionary of all-pair shortest paths, it edits shortest paths to ensure that all path are symmetric, e.g., path(u,v) = path(v,u) Parameters - shortest_paths : dict of dict All pairs shortest paths Returns - shortest_paths : dict of dict All pairs shortest paths, with all paths symmetric Notes - This function modifies the shortest paths dictionary provided """ for u in shortest_paths : for v in shortest_paths : shortest_paths = list ( reversed ( shortest_paths )) return shortest_paths """ import logging import networkx as nx import fnss from icarus.registry import CACHE_POLICY from icarus.util import path_links, iround _all_ = logger = logging. The `NetworkController` is also responsible to notify a `DataCollectorProxy` of all relevant events. The strategy can get updated information about the network status by calling methods of the `NetworkView` instance. ![]() ![]() A strategy performs actions on the network by calling methods of the `NetworkController`, that in turns updates the `NetworkModel` instance that updates the `NetworkView` instance. The network is modelled using an MVC design pattern. """Network Model-View-Controller (MVC) This module contains classes providing an abstraction of the network shown to the strategy implementation.
0 Comments
Leave a Reply. |
AuthorWrite something about yourself. No need to be fancy, just an overview. ArchivesCategories |