2
0
mirror of https://github.com/openvswitch/ovs synced 2025-08-23 10:28:00 +00:00

7 Commits

Author SHA1 Message Date
Ilya Maximets
3131588e1e python: Require Python 3.7 for ssl.TLSVersion.
All the ssl.OP_NO_* options are deprecated since OpenSSL 1.1.0.
Use minimum/maximum_version configuration instead.

Unfortunately, those only available in Python 3.7, so increasing
the minimal supported Python version.  Python 3.7+ should be
available in most modern distributions.  It is also EoL at this
point, but there is no need to require higher versions.

Acked-by: Eelco Chaudron <echaudro@redhat.com>
Signed-off-by: Ilya Maximets <i.maximets@ovn.org>
2024-12-13 13:00:27 +01:00
Ilya Maximets
e263708898 python: Don't install ovs-flowviz.conf as a global data.
Specifying data_files makes setuptools install this file to a global
sys.prefix.  So, it ends up in both the main directory of the python
package and in the /usr/ovs-flowviz.conf, which is not good:

 warning: install_data: setup script did not provide a directory for
          'ovs/flowviz/ovs-flowviz.conf' -- installing right in
          'build/bdist.linux-x86_64/wheel/ovs-3.4.90.data/data'
 adding 'ovs-3.4.90.data/data/ovs-flowviz.conf'

There is no real point installing this file globally, just use the
package_data to ensure it is included in the python package.

Acked-by: Eelco Chaudron <echaudro@redhat.com>
Reviewed-by: Adrian Moreno <amorenoz@redhat.com>
Signed-off-by: Ilya Maximets <i.maximets@ovn.org>
2024-10-25 21:33:26 +02:00
Adrian Moreno
4214bf4b28 python: ovs: flowviz: Add datapath graph format.
Graph view leverages the TreeFlow hierarchy and uses graphviz library to
build a visual graph of the datapath tree.

Conntrack zones are shown in random colors to help visualize connection
tracking interdependencies.

An html flag builds an HTML page with both the html flows and the graph
(in svg) that enables navigation.

Examples:
$ ovs-appctl dpctl/dump-flows -m | ovs-flowviz datapath graph | dot
-Tpng -o graph.png
$ ovs-appctl dpctl/dump-flows -m | ovs-flowviz datapath graph --html >
flows.html

Acked-by: Eelco Chaudron <echaudro@redhat.com>
Signed-off-by: Adrian Moreno <amorenoz@redhat.com>
Signed-off-by: Ilya Maximets <i.maximets@ovn.org>
2024-10-19 02:16:18 +02:00
Adrian Moreno
d6fbc19e4a python: ovs: flowviz: Add default config file.
It has two basic styles defined: "dark" and "light" intended for
dark and light terminals.

Examples:
$ ovs-flowviz -i /tmp/dpflows --style=dark datapath console
$ ovs-flowviz -i /tmp/ofpflows --style=light openflow console

Acked-by: Eelco Chaudron <echaudro@redhat.com>
Signed-off-by: Adrian Moreno <amorenoz@redhat.com>
Signed-off-by: Ilya Maximets <i.maximets@ovn.org>
2024-10-19 02:04:01 +02:00
Adrian Moreno
ec2646dd43 python: ovs: flowviz: Add console formatting.
Add a flow formatting framework and one implementation for console
printing using rich.

The flow formatting framework is a simple set of classes that can be
used to write different flow formatting implementations. It supports
styles to be described by any class, highlighting and config-file based
style definition.

The first flow formatting implementation is also introduced: the
ConsoleFormatter. It uses the an advanced rich-text printing library
[1].

The console printing supports:
- Heatmap: printing the packet/byte statistics of each flow in a color
  that represents its relative size: blue (low) -> red (high).
- Printing a banner with the file name and alias.
- Extensive style definition via config file.

This console format is added to both OpenFlow and Datapath flows.

Examples:
- Highlight drops in datapath flows:
$ ovs-flowviz -i flows.txt --highlight "drop" datapath console
- Quickly detect where most packets are going using heatmap and
  paginated output:
$ ovs-ofctl dump-flows br-int | ovs-flowviz openflow console -h

[1] https://rich.readthedocs.io/en/stable/introduction.html

Acked-by: Eelco Chaudron <echaudro@redhat.com>
Signed-off-by: Adrian Moreno <amorenoz@redhat.com>
Signed-off-by: Ilya Maximets <i.maximets@ovn.org>
2024-10-19 02:03:09 +02:00
Adrian Moreno
2fb2dbe827 python: ovs: Add flowviz scheleton.
Add a new python package (just the scheleton for now) to hold a flow
visualization tool based on the flow parsing library.

flowviz dependencies are installed via "extras_require", so a user must
run:

  $ pip install .[flowviz]
  or
  $ pip install ovs[flowviz]

Acked-by: Eelco Chaudron <echaudro@redhat.com>
Signed-off-by: Adrian Moreno <amorenoz@redhat.com>
Signed-off-by: Ilya Maximets <i.maximets@ovn.org>
2024-10-19 02:00:16 +02:00
Timothy Redaelli
9e6d43ef32 rhel: Make the version, displayed to the user, customizable.
Since on CentOS/RHEL the builds are based on stable branches and not on
tags for debugging purpose it's better to have the downstream version as
version so it's easier to know which commits are included in a build.

This commit adds --with-version-suffix as ./configure option in
order to set an OVS version suffix that should be shown to the user via
ovs-vsctl -V and, so, also on database, on ovs-vsctl show and the other
utilities.

--with-version-suffix is used in Fedora/CentOS/RHEL spec file in order to have
the version be aligned with the downstream one.

Signed-off-by: Timothy Redaelli <tredaelli@redhat.com>
Signed-off-by: Ilya Maximets <i.maximets@ovn.org>
2024-07-15 16:13:09 +02:00