Script 'mail_helper' called by obssrc
Hello community,

here is the log from the commit of package virt-bridge-setup for 
openSUSE:Factory checked in at 2025-04-03 16:50:56
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Comparing /work/SRC/openSUSE:Factory/virt-bridge-setup (Old)
 and      /work/SRC/openSUSE:Factory/.virt-bridge-setup.new.1907 (New)
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++

Package is "virt-bridge-setup"

Thu Apr  3 16:50:56 2025 rev:5 rq:1266842 version:0.9

Changes:
--------
--- /work/SRC/openSUSE:Factory/virt-bridge-setup/virt-bridge-setup.changes      
2025-03-25 22:19:21.003858488 +0100
+++ 
/work/SRC/openSUSE:Factory/.virt-bridge-setup.new.1907/virt-bridge-setup.changes
    2025-04-03 16:52:15.740902219 +0200
@@ -1,0 +2,8 @@
+Thu Apr  3 08:17:56 UTC 2025 - Antoine Ginies <agin...@suse.com>
+
+- version 0.9:
+  * add a forward-delay option
+  * add an STP option
+  * fix displaying error
+
+-------------------------------------------------------------------

Old:
----
  0.8.tar.gz

New:
----
  0.9.tar.gz

++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++

Other differences:
------------------
++++++ virt-bridge-setup.spec ++++++
--- /var/tmp/diff_new_pack.ZjXKBm/_old  2025-04-03 16:52:16.180920758 +0200
+++ /var/tmp/diff_new_pack.ZjXKBm/_new  2025-04-03 16:52:16.184920927 +0200
@@ -16,7 +16,7 @@
 #
 
 Name:           virt-bridge-setup
-Version:        0.8
+Version:        0.9
 Release:        1%{?dist}
 Summary:        Script to setup virtual bridges
 License:        GPL-2.0-or-later
@@ -44,6 +44,5 @@
 %doc README.md
 %attr(0755,root,root) %{_sbindir}/%{name}
 %{_sysconfdir}
-#/systemd/network
 %attr(0644,root,root) %{_sysconfdir}/systemd/network/98-default-bridge.link
 

++++++ 0.8.tar.gz -> 0.9.tar.gz ++++++
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/virt-bridge-setup-0.8/README.md 
new/virt-bridge-setup-0.9/README.md
--- old/virt-bridge-setup-0.8/README.md 2025-03-24 18:33:37.000000000 +0100
+++ new/virt-bridge-setup-0.9/README.md 2025-04-03 11:25:11.000000000 +0200
@@ -3,7 +3,8 @@
 This script allows you to create a network bridge on a specified interface 
using `nmcli`.
 It simplifies the process of creating and managing network bridges for 
virtualization environments.
 This was originally created to replace the automatic "yast2 virtualization" 
bridge creation.
-Support IPV4 only.
+Support IPV4 only. This is a simple script which doesnt aim to support all 
network scenarios. For
+complex task please setup the bridge manually.
 
 ## Features
 
@@ -12,6 +13,8 @@
 - `-f` `--force`: deletes an existing bridge if used
 - `-i` `--interface`: options to select the device
 - `-s` `--simple`: Simple way to create the bridge
+- `--fdelay`: forward-delay option
+- `--stp`: Set Spanning Tree to yes or no
 - `-n` `--norun`: Dry run
 - `-m` `--mac`: Force using MAC address from the slave interface
 - `-d` `--debug`: show debug info
@@ -33,7 +36,7 @@
 ## Usage
 
 ```sh
-python virt-bridge-setup.py -i <interface_name> [-f] [-d] [-s]
+python virt-bridge-setup.py -i <interface_name> [-f] [-d] [-s] [--fdelay] 
SECONDS [--stp] (yes|no)
 ```
 
 ## Licence
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/virt-bridge-setup-0.8/virt-bridge-setup.changes 
new/virt-bridge-setup-0.9/virt-bridge-setup.changes
--- old/virt-bridge-setup-0.8/virt-bridge-setup.changes 2025-03-24 
18:33:37.000000000 +0100
+++ new/virt-bridge-setup-0.9/virt-bridge-setup.changes 2025-04-03 
11:25:11.000000000 +0200
@@ -1,4 +1,12 @@
 -------------------------------------------------------------------
+Thu Apr  3 08:17:56 UTC 2025 - Antoine Ginies <agin...@suse.com>
+
+- version 0.9:
+  * add a forward-delay option
+  * add an STP option
+  * fix displaying error
+
+-------------------------------------------------------------------
 Mon Mar 24 16:18:14 UTC 2025 - Antoine Ginies <agin...@suse.com>
 
 - version 0.8:
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/virt-bridge-setup-0.8/virt-bridge-setup.py 
new/virt-bridge-setup-0.9/virt-bridge-setup.py
--- old/virt-bridge-setup-0.8/virt-bridge-setup.py      2025-03-24 
18:33:37.000000000 +0100
+++ new/virt-bridge-setup-0.9/virt-bridge-setup.py      2025-04-03 
11:25:11.000000000 +0200
@@ -67,8 +67,7 @@
         _, stderr = run_command(f"nmcli connection modify '{conn_name}' master 
{bridge_interface}")
     else:
         # work around a strange behavior of NetworkManager in SLE16 and TW
-        _, stderr = run_command(f"nmcli connection add type {conn_type} ifname 
\
-                {interface} con-name {interface}-slave master {MY_BRIDGE}")
+        _, stderr = run_command(f"nmcli connection add type {conn_type} ifname 
{interface} con-name {interface}-slave master {MY_BRIDGE}")
     if stderr:
         logging.error(f"Error add type {conn_type} ifname {interface}: 
{stderr}")
         return
@@ -81,10 +80,28 @@
     force using mac address from slave interface
     """
     _, stderr = run_command(f"nmcli connection modify {bridge_name} 
bridge.mac-address {mac_address}")
-    if stderr == "":
+    if stderr:
         logging.error(f"Error modify connection with MAC address: 
{mac_address}: {stderr}")
         return
 
+def set_stp(bridge_name, stp_option):
+    """
+    STP yes or no
+    """
+    _, stderr = run_command(f"nmcli connection modify {bridge_name} bridge.stp 
{stp_option}")
+    if stderr:
+        logging.error(f"Error modify {bridge_name} bridge.stp {stp_option}: 
{stderr}")
+        return
+
+def set_fdelay(bridge_name, fdelay):
+    """
+    forward delay option
+    """
+    _, stderr = run_command(f"nmcli connection modify {bridge_name} 
bridge.forward-delay {fdelay}")
+    if stderr:
+        logging.error(f"Error modify {bridge_name} bridge.forward-delay 
{fdelay}: {stderr}")
+        return
+
 def delete_bridge(bridge_interface, bridge_name, interface):
     """
     delete bridge_name
@@ -221,6 +238,8 @@
     parser.add_argument('-f', '--force', action='store_true', help='Force 
deleting previous bridge')
     parser.add_argument('-s', '--simple', action='store_true', help='Simple 
way of creating the bridge')
     parser.add_argument('-m', '--mac', action='store_true', help='Force using 
MAC address from slave interface')
+    parser.add_argument('--stp', type=str, help='Set STP to yes or no')
+    parser.add_argument('--fdelay', type=int, help='Set forward-delay option 
(in second)')
     parser.add_argument('-n', '--norun', action='store_true', help='Dry run')
     parser.add_argument('-d', '--debug', action='store_true', help='Enable 
debug mode to show all commands executed')
     args = parser.parse_args()
@@ -287,9 +306,16 @@
         create_bridge(BRIDGE_INTERFACE, master_interface, conn_name, 
conn_type, simple)
         if args.mac:
             if simple is False:
-                force_mac_address(bridge_name, mac_address)
+                force_mac_address(MY_BRIDGE, mac_address)
             else:
                 logging.info("Can't force MAC address in simple mode")
+        if args.stp:
+            if args.stp.lower() not in ['yes', 'no']:
+                logging.error(f"{args.stp} is not yes or no")
+                exit(1)
+            set_stp(MY_BRIDGE, args.stp.lower())
+        if args.fdelay:
+            set_fdelay(MY_BRIDGE, args.fdelay)
         bring_bridge_up(BRIDGE_INTERFACE, master_interface, simple)
 
 if __name__ == "__main__":
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/virt-bridge-setup-0.8/virt-bridge-setup.spec 
new/virt-bridge-setup-0.9/virt-bridge-setup.spec
--- old/virt-bridge-setup-0.8/virt-bridge-setup.spec    2025-03-24 
18:33:37.000000000 +0100
+++ new/virt-bridge-setup-0.9/virt-bridge-setup.spec    2025-04-03 
11:25:11.000000000 +0200
@@ -16,7 +16,7 @@
 #
 
 Name:           virt-bridge-setup
-Version:        0.8
+Version:        0.9
 Release:        1%{?dist}
 Summary:        Script to setup virtual bridges
 License:        GPL-2.0-or-later

Reply via email to