From 04d45c2cccfddebf9c84e7e745441c7c5586734f Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Nicolas=20L=C3=A9cureuil?= Date: Tue, 8 Jun 2021 17:10:07 +0200 Subject: [PATCH] (loaddeployment plugin) Fix hostname Remove after the dot as we only want the hostname and not the fqdn. --- .../pluginsmastersubstitute/plugin_loaddeployment.py | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/pulse_xmpp_master_substitute/pluginsmastersubstitute/plugin_loaddeployment.py b/pulse_xmpp_master_substitute/pluginsmastersubstitute/plugin_loaddeployment.py index 3d0c0fb0f..d748983d1 100644 --- a/pulse_xmpp_master_substitute/pluginsmastersubstitute/plugin_loaddeployment.py +++ b/pulse_xmpp_master_substitute/pluginsmastersubstitute/plugin_loaddeployment.py @@ -120,8 +120,7 @@ def scheduledeploy(self): resultpresence = XmppMasterDatabase().getPresenceExistuuids(UUID) re_search = [] if resultpresence[UUID][1] == 0: - ## il n'y a pas de uuid glpi - re_search = XmppMasterDatabase().getMachinedeployexistonHostname(deployobject['name']) + re_search = XmppMasterDatabase().getMachinedeployexistonHostname(deployobject['name'].split('.')[0]) if self.Recover_GLPI_Identifier_from_name and len(re_search) == 1: update_result = XmppMasterDatabase().update_uuid_inventory(re_search[0]['id'], UUID) if update_result is not None: