Giter Club home page Giter Club logo

manageiq-providers-redfish's Introduction

ManageIQ plugin for the Redfish provider

Gem Version Build Status Code Climate Test Coverage Dependency Status Security

Chat Translate

Quickstart

Redfish provider is installed by default when seting up ManageIQ development environment. To start using it, navigate to the Compute -> Physical Infrastructure -> Providers and add new provider of type Redfish.

Development environment setup

See the ManageIQ Developer Setup guide for help on installing prerequistes for ManageIQ development. In this section, we will assume that ManageIQ core repo resides in ~/miq/manageiq, so adjust path accordingly.

Now, to start working on Redfish provider, we must first clone the repo:

$ cd ~/miq
$ git clone [email protected]:ManageIQ/manageiq-providers-redfish.git
$ cd manageiq-providers-redfish

After this is done, we must perform the initial setup by running

$ bin/setup

After the initial setup is done, we can test the environment by executing

$ bundle exec rake

This command should run test suite and return with no error. If this is not the case, congratulations to us, since we can start debugging our setup;) If everything is green, we are ready start adding bugs features to the Redfish provider.

To be able to view and test the changes we are making to the provider, we must override the gem sources in ~/miq/manageiq/bundler.d/overrides.rb. In our case, overrides.rb should look something like this:

override_gem "manageiq-providers-redfish",
  :path => File.expand_path("~/miq/manageiq-providers-redfish")

Do not use relative path in File.expand_path call, since this is just calling for troubles. To actually install the local gems, run

$ ( cd ../manageiq && bin/update )

Now ManageIQ will use the local manageiq-providers-redfish repository instead of fetching from GitHub. This will allow you to test changes and debug before your changes have been merged.

But it will not take long for us to get into situation where we will need to modify some other parts of the ManageIQ in order to get new feature in. In order to be able to run automated test suite in such situations, we need to remove ~/miq/manageiq-providers-redfish/spec/manageiq folder and replace it with symbolic link to ~/miq/manageiq. To get things updated, we need to run

$ bin/update

Last thing we need in order to be able to develop Redfish provider is mock Redfish server. And fortunately for us, it has been already installed as a part of an initial setup. We just need to get our hands on some recordings and we are good to go.

One recording is available in XLAB's repo. We can clone it and instruct mock server to serve it:

$ ( cd ~/miq && git clone https://github.com/xlab-si/redfish-recordings )
$ bundle exec redfish serve ../redfish-recordings/lenovo-sr650

Advanced setup (if we need changes in core)

  1. remove spec/manageiq and replace it with a symlink to ~/miq/manageiq
  2. checkout proper branch in ~/miq/manageiq
  3. bin/update in ~/miq/manageiq
  4. bundle exec rake

Testing changes manually

  1. edit ~/miq/manageiq/bundler.d/overrides.rb
  2. bin/update
  3. MIQ_SPARTAN=minimal:ems_inventory bundle exec rake evm:start
  4. go to localhost:3000 (admin/smartvm)

License

The gem is available as open source under the terms of the Apache License 2.0.

Contributing

  1. Fork it
  2. Create your feature branch (git checkout -b my-new-feature)
  3. Commit your changes (git add ... and git commit)
  4. Push to the branch (git push origin my-new-feature)
  5. Create new Pull Request

manageiq-providers-redfish's People

Contributors

agrare avatar carbonin avatar chessbyte avatar fryguy avatar gberginc avatar jprause avatar jrafanie avatar ladas avatar miha-plesko avatar mzazrivec avatar simaishi avatar slemrmartin avatar tadeboro avatar

Watchers

 avatar  avatar

Forkers

tubbz-alt

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.