[Spacewalk-list] Python API Inventory

Colin Coe colin.coe at gmail.com
Thu May 1 22:23:50 UTC 2014


So is it a Python script or a Perl script?

If its a Perl script, place RHNSession in the Perl library path (do a
'perl -V' and any of the directories shown after @INC should be fine),
or in your Perl script add a line near the top saying 'use lib
INSERT_DIR_HERE;' replacing INSERT_DIR_HERE with the name of the
directory where you placed the RHNSession Perl module.

HTH

CC

On Thu, May 1, 2014 at 9:39 AM, Support <support at pureview.com> wrote:
> Colin,
>
> I'm still having the same error. I do not know where RHNSession goes?
>
> Thank you,
> -David
>
>
> On 4/27/2014 2:07 AM, Colin Coe wrote:
>>
>> RHNSession.pm can be found at
>> https://fedorahosted.org/spacewalk/wiki/SpacewalkApiPerlGuide
>>
>> I note that you are referring to a Python script but RHNSession.pm is
>> a Perl module.  Just stating the obvious, I hope...
>>
>> CC
>>
>> On Sun, Apr 27, 2014 at 11:33 AM, Support <support at pureview.com> wrote:
>>>
>>> Hi Will,
>>>
>>> It's quite a bit a time since you replay back to my request. I would
>>> really
>>> appreciated if you can help me on this error..
>>> I'm trying to use your perl script which is pretty much is everything I
>>> need
>>> it in the nice format you wrote.
>>>
>>> I have installed all the perl dependencies it required, but I'm a bit
>>> confused about  "use RHNSession;" on your script.
>>> Do I have to create a file or where do I find it and where it needs to be
>>> placed? I don't quite I understand. If you could help me on the right
>>> direcction
>>>
>>> Can't locate RHNSession.pm in @INC (@INC contains: /usr/local/lib64/perl5
>>> /usr/local/share/perl5 /usr/lib64/perl5/vendor_perl
>>> /usr/share/perl5/vendor_perl /usr/lib64/perl5 /usr/share/perl5 .) at
>>> ./sysreport-rhn.pl line 15.
>>> BEGIN failed--compilation aborted at ./sysreport-rhn.pl line 15. "This
>>> line
>>> is use RHNSession;"
>>>
>>> Wouldn't mind share your python inventory script if you could.!
>>>
>>> Thank you very much for you time..
>>> -David
>>>
>>>
>>>
>>> On 1/27/2014 7:47 AM, wm-lists wrote:
>>>
>>> You can make use of the API to write all kinds of reports.  For simple
>>> information I'd suggest /usr/bin/spacewalk-report which has a lot of
>>> information it .
>>> I've published some of my older perl scripts that you are welcome to
>>> check
>>> out.  They may not be programmatically correct and I've converted a lot
>>> of
>>> stuff to python since writing these, but maybe they'll give you some
>>> ideas.
>>>
>>> http://www.nixpeeps.com/wordpress/?p=305
>>>
>>> Will
>>>
>>>
>>> On Sun, Jan 26, 2014 at 6:10 PM, <support at pureview.com> wrote:
>>>>
>>>> Hello,
>>>>
>>>> I'm wonder if any one in this list already is trying to use  Python API
>>>> to
>>>> interact with spacewalk or RedHat5.4 Satellite server.
>>>> What I'm looking for is a script to gather or query the satellite server
>>>> to get all the information on all the server information, such hardware,
>>>> mounting point, interface or ip and etc.
>>>>
>>>> If anyone know of any project or easy script I would really appreciated
>>>> anyone to guide me to the right direction.
>>>>
>>>> Thank you,
>>>> -David
>>>>
>>>> _______________________________________________
>>>> Spacewalk-list mailing list
>>>> Spacewalk-list at redhat.com
>>>> https://www.redhat.com/mailman/listinfo/spacewalk-list
>>>
>>>
>>>
>>>
>>> _______________________________________________
>>> Spacewalk-list mailing list
>>> Spacewalk-list at redhat.com
>>> https://www.redhat.com/mailman/listinfo/spacewalk-list
>>>
>>>
>>>
>>> _______________________________________________
>>> Spacewalk-list mailing list
>>> Spacewalk-list at redhat.com
>>> https://www.redhat.com/mailman/listinfo/spacewalk-list
>>
>>
>>
>
> _______________________________________________
> Spacewalk-list mailing list
> Spacewalk-list at redhat.com
> https://www.redhat.com/mailman/listinfo/spacewalk-list



-- 
RHCE#805007969328369




More information about the Spacewalk-list mailing list