0.01
Low commit activity in last 3 years
A long-lived project that still receives updates
Lenovo XClarity API Client
2005
2006
2007
2008
2009
2010
2011
2012
2013
2014
2015
2016
2017
2018
2019
2020
2021
2022
2023
2024
2025
2026
 Dependencies

Development

>= 1.11.2
~> 10.0
~> 3.0
~> 2.1.0
~> 1.8.3

Runtime

 Project Readme

Lenovo Xclarity Logo

xclarity_client

Build Status

Ruby gem to interact with Lenovo XClarity.

Installation

Add this line to your application's Gemfile:

gem 'xclarity_client'

And then execute:

$ bundle install

Or install it yourself as:

$ gem install xclarity_client

Usage

To configure your appliance access:

require 'xclarity_client'

conf = XClarityClient::Configuration.new(
  :host             => 'http://lxca_host.com'
  :username         => 'username',
  :password         => 'password',
  :port             => 'lxca_port',
  :auth_type        => 'auth_type',  # ('token', 'basic_auth')
  :verify_ssl       => 'verify_ssl', # ('PEER', 'NONE')
  :user_agent_label => 'user_agent'  # Api gem client identification
)

client = XClarityClient::Client.new(conf)

To access the appliance data:

client.discover_aicc # get AICC informations

client.discover_cabinet # get Cabinets from LXCA appliance

# get the cabinets with the specifieds UUIDs,
# and retrive just `storageList` and `height` attributes.
client.fetch_cabinet(
  uuids = ['590b2546bbbc457f-bf801661018c408e', 'd27e57aa278c49a9b57e34a8e6c6e8ae'],
  include_attributes = ['storageList', 'height']
)

# get the cabinets with the specifieds UUIDs,
# and retrive all attributes except `height`.
client.fetch_cabinet(
  uuids = ['590b2546bbbc457f-bf801661018c408e', 'd27e57aa278c49a9b57e34a8e6c6e8ae'],
  exclude_attributes = ['height']
)

To see how to interact with other LXCA resources, please take a look at lib/xclarity_client/mixins folder.

Development

After checking out the repo, run bin/setup to install dependencies. Then, run rake spec to run the tests. You can also run bin/console for an interactive prompt that will allow you to experiment.

To install this gem onto your local machine, run bundle exec rake install. To release a new version, update the version number in version.rb, and then run bundle exec rake release, which will create a git tag for the version, push git commits and tags, and push the .gem file to rubygems.org.

Contributing

Bug reports and pull requests are welcome on GitHub at https://github.com/ManageIQ/xclarity_client. This project is intended to be a safe, welcoming space for collaboration, and contributors are expected to adhere to the Contributor Covenant code of conduct.