File 0006-fence_compute-Fix-fix_plug_name-when-looking-if-plug.patch of Package fence-agents.openSUSE_Leap_42.3_Update

From 6336eb074669eaf1eb6cfa1f41366b4848a7af9e Mon Sep 17 00:00:00 2001
From: Vincent Untz <vuntz@suse.com>
Date: Wed, 29 Jun 2016 09:51:37 +0200
Subject: [PATCH 6/7] fence_compute: Fix fix_plug_name when looking if plug has
 domain

We shouldn't check if the plug name contains the domain, but if it ends
with the domain.
---
 fence/agents/compute/fence_compute.py | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

Index: fence-agents-4.0.25+git.1485179354.eb43835/fence/agents/compute/fence_compute.py
===================================================================
--- fence-agents-4.0.25+git.1485179354.eb43835.orig/fence/agents/compute/fence_compute.py
+++ fence-agents-4.0.25+git.1485179354.eb43835/fence/agents/compute/fence_compute.py
@@ -281,8 +281,8 @@ def fix_plug_name(options):
 		# Ensure any domain is stripped off since nova isn't using FQDN
 		options["--plug"] = short_plug
 
-	elif options["--domain"] in options["--plug"]:
-		# Plug already contains the domain, don't re-add 
+	elif options["--plug"].endswith(options["--domain"]):
+		# Plug already uses the domain, don't re-add
 		return
 
 	else:
openSUSE Build Service is sponsored by