-:- Rameshkumar

Successfully Architect, Design, Built, Implement, Manage and Administered - HP BSA Suite. EMail I'D -:- RameshKumar132@gmail.com BB Pin -:- 3230B5CF

Wednesday, March 02, 2011

Python Spin Wrapper in HPSA 9.03

HPSA Python SpinWrapper example to get the HPSA Realm Details: 


# env PYTHONPATH=/opt/opsware/pylibs /opt/opsware/bin/
python
Python 1.5.2 (#1, Jun  5 2010, 18:06:43)  [GCC 3.4.5] on linux-i386
Copyright 1991-1995 Stichting Mathematisch Centrum, Amsterdam
>>> import sys
>>> sys.path.append("/opt/opsware/pylibs")
>>> from coglib import spinwrapper
>>> spin = spinwrapper.SpinWrapper()
>>> r = spin.Realm.getList()
>>> r
[[30900L, 'HPSA903-agents'], [20900L, 'HPSA903-mm'], [0L, 'TRANSITIONAL'], [10900L, 'HPSA903']]
>>> r1 = spin.Realm.get(30900L)
>>> r1
{'tran_id': 17980900L, 'id': 30900L, 'realm_id': 30900L, 'created_dt': , 'obj_class': 'Realm', 'realm_name': 'HPSA903-agents', 'created_by': '10.10.10.225', 'realm_type': 'SATELLITE', 'display_name': 'HPSA903-agents', 'modified_by': None, 'modified_dt': , 'conflicting': 0}
>>>
>>>


Any Question or help needed regarding this HPSA Python SpinWrapper, please drop a email to me. 

-:- Rameshkumar 
Email I'D : RameshKumar132@gmail.com