<div dir="ltr">I have used the following to test for servers with the same id in satellite...possibly could work for you..or could help you out.<br><br>#!/usr/bin/python<br>import xmlrpclib,sys<br>import socket<br><br>SATELLITE_URL = "http://<put the name of your satellite servers full url..ex <a href="http://vasat.com">vasat.com</a>>/rpc/api"<br>
#User account to connect to satellite server<br>SATELLITE_LOGIN = "<user login for satellite server>"<br>#Password for above connection<br>SATELLITE_PASSWORD = "password for satellite user"<br>#Accept an argument<br>
SERVENAME = sys.argv<br>try:<br><br>    client = xmlrpclib.Server(SATELLITE_URL, verbose=0)<br><br>    key = client.auth.login(SATELLITE_LOGIN, SATELLITE_PASSWORD)<br>except socket.gaierror:<br>    #print SATELLITE_URL + " does not exits."<br>
    sys.exit(2)<br><br>list = client.system.listUserSystems(key)<br>#Loop through list and return server name that's matched<br>for system in list:<br>   #if the server name exists in the server then delete it<br>   if system.get('name') in (SERVENAME):<br>
        #print "Found the server " + system.get('name')<br>        #print "System ID is " + `system.get('id')`<br>        #print "Deleting system from satellite server"<br>        returncode = client.system.deleteSystems(key,system.get('id'))<br>
        #print returncode<br><br>client.auth.logout(key)<br><br></div><div class="gmail_extra"><br><br><div class="gmail_quote">On Mon, May 20, 2013 at 10:52 AM, Coffman, Anthony J <span dir="ltr"><<a href="mailto:Tony.Coffman@snapon.com" target="_blank">Tony.Coffman@snapon.com</a>></span> wrote:<br>
<blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">





<div link="#0563C1" vlink="#954F72" lang="EN-US">
<div>
<p class="MsoNormal">Is there an easy way in Spacewalk to detect duplicate system IDs checking in with different hostnames?<u></u><u></u></p>
<p class="MsoNormal"><u></u> <u></u></p>
<p class="MsoNormal">Occasionally we’ll screw up a VM clone and end up with a new hostname but the same systemid.  In that case the duplicate won’t show up in Duplicate Systems and it can be somewhat difficult to spot until a scheduled action fails or acts
 in an otherwise surprising way or we spot it in an audit (compare Spacewalk inventory to other inventory DBs).<u></u><u></u></p>
<p class="MsoNormal"><u></u> <u></u></p>
<p class="MsoNormal">Regards,<u></u><u></u></p>
<p class="MsoNormal">--Tony<u></u><u></u></p>
<p class="MsoNormal"><u></u> <u></u></p>
</div>
</div>

<br>_______________________________________________<br>
Spacewalk-list mailing list<br>
<a href="mailto:Spacewalk-list@redhat.com">Spacewalk-list@redhat.com</a><br>
<a href="https://www.redhat.com/mailman/listinfo/spacewalk-list" target="_blank">https://www.redhat.com/mailman/listinfo/spacewalk-list</a><br></blockquote></div><br></div>