-:- Rameshkumar

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

Friday, March 04, 2011

How to get Faclity in HPSA 9.03 details using SpinWrapper?

SpinWrapper from HPSA is also used to get the details of the facilities.

Here is the example :  




# 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()
>>> d = spin.DataCenter.getList()
>>> d
[[900L, 'HPSA903']]
>>> d1 = spin.DataCenter.get(900L)
>>> d1
{'dns_subdomain': 'hpsa903.corptest.ops.net', 'obj_class': 'DataCenter', 'id': 900L, 'created_by': None, 'rack_location_mask': 'DataCenter:4,Building:2,Floor:2,Cage:4,Row:2,Rack:3,Slot:1', 'created_dt': None, 'ontogeny': 'PROD', 'data_center_id': 900L, 'dns_sequence': 1, 'data_center_name': 'HPSA903', 'tran_id': None, 'modified_by': None, 'display_name': 'HPSA903', 'modified_dt': None, 'conflicting': 0, 'status': 'ACTIVE'}
>>>
>>>


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

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