public inbox for pve-devel@lists.proxmox.com
 help / color / mirror / Atom feed
From: Alexandre Derumier <aderumier@odiso.com>
To: pve-devel@lists.proxmox.com
Subject: [pve-devel] [PATCH pve-network 2/2] subnets: fix add|del subnets withtout ipam
Date: Sat,  8 May 2021 07:51:36 +0200	[thread overview]
Message-ID: <20210508055136.3118159-3-aderumier@odiso.com> (raw)
In-Reply-To: <20210508055136.3118159-1-aderumier@odiso.com>

---
 PVE/Network/SDN/Subnets.pm | 2 ++
 1 file changed, 2 insertions(+)

diff --git a/PVE/Network/SDN/Subnets.pm b/PVE/Network/SDN/Subnets.pm
index 0cdadf7..46d9830 100644
--- a/PVE/Network/SDN/Subnets.pm
+++ b/PVE/Network/SDN/Subnets.pm
@@ -165,6 +165,7 @@ sub add_subnet {
     my ($zone, $subnetid, $subnet) = @_;
 
     my $ipam = $zone->{ipam};
+    return if !$ipam;
     my $ipam_cfg = PVE::Network::SDN::Ipams::config();
     my $plugin_config = $ipam_cfg->{ids}->{$ipam};
     my $plugin = PVE::Network::SDN::Ipams::Plugin->lookup($plugin_config->{type});
@@ -175,6 +176,7 @@ sub del_subnet {
     my ($zone, $subnetid, $subnet) = @_;
 
     my $ipam = $zone->{ipam};
+    return if !$ipam;
     my $ipam_cfg = PVE::Network::SDN::Ipams::config();
     my $plugin_config = $ipam_cfg->{ids}->{$ipam};
     my $plugin = PVE::Network::SDN::Ipams::Plugin->lookup($plugin_config->{type});
-- 
2.20.1




  parent reply	other threads:[~2021-05-08  5:51 UTC|newest]

Thread overview: 4+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2021-05-08  5:51 [pve-devel] [PATCH pve-network 0/2] " Alexandre Derumier
2021-05-08  5:51 ` [pve-devel] [PATCH pve-network 1/2] subnets: tests: add noipam test Alexandre Derumier
2021-05-08  5:51 ` Alexandre Derumier [this message]
2021-05-10  7:38 ` [pve-devel] applied-series: [PATCH pve-network 0/2] subnets: fix add|del subnets withtout ipam Thomas Lamprecht

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20210508055136.3118159-3-aderumier@odiso.com \
    --to=aderumier@odiso.com \
    --cc=pve-devel@lists.proxmox.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox
Service provided by Proxmox Server Solutions GmbH | Privacy | Legal