Address future warning by networkx
Add explicit edges argument to resolve the following warning emit by networkx. The default value will be changed to `edges="edges" in NetworkX 3.6. To make this warning go away, explicitly set the edges kwarg, e.g.: nx.node_link_graph(data, edges="links") to preserve current behavior, or nx.node_link_graph(data, edges="edges") for forward compatibility. warnings.warn( Change-Id: I7281758ca4325ee1837469e300b4d665674c8f43 Signed-off-by: Takashi Kajinami <kajinamit@oss.nttdata.com>
This commit is contained in:

committed by
Ivan Anfimov

parent
652b3d1205
commit
2bf8d764ed
@@ -9,7 +9,7 @@ cryptography>=2.7 # BSD/Apache-2.0
|
||||
lxml>=4.5.2 # BSD
|
||||
PyMySQL>=0.8.0 # MIT License
|
||||
python-dateutil>=2.7.0 # BSD
|
||||
networkx>=2.4 # BSD
|
||||
networkx>=3.4 # BSD
|
||||
oslo.config>=6.8.0 # Apache-2.0
|
||||
oslo.context>=2.22.0 # Apache-2.0
|
||||
oslo.db>=4.44.0 # Apache-2.0
|
||||
|
@@ -100,7 +100,7 @@ class TopologyController(RootRestController):
|
||||
@staticmethod
|
||||
def as_tree(graph, root=OPENSTACK_CLUSTER, reverse=False):
|
||||
linked_graph = json_graph.node_link_graph(
|
||||
graph, name='graph_index')
|
||||
graph, name='graph_index', edges="links")
|
||||
if 0 == nx.number_of_nodes(linked_graph):
|
||||
return {}
|
||||
if reverse:
|
||||
|
Reference in New Issue
Block a user