Skip to content

Commit

Permalink
Merge pull request #492 from HewlettPackard/Release6.0
Browse files Browse the repository at this point in the history
Release changes for 2600
  • Loading branch information
yuvirani authored Mar 9, 2021
2 parents bf4b2cb + 4acd8c1 commit d5461bb
Show file tree
Hide file tree
Showing 4 changed files with 31 additions and 31 deletions.
4 changes: 2 additions & 2 deletions .github/workflows/dockerimage.yml
Original file line number Diff line number Diff line change
Expand Up @@ -23,6 +23,6 @@ jobs:
- name: Login to Docker Hub
run: echo ${{ secrets.DOCKER_PASSWORD }} | docker login -u ${{ secrets.DOCKER_USERNAME }} --password-stdin
- name: Build the tagged Docker image
run: docker build . --file Dockerfile --tag hewlettpackardenterprise/hpe-oneview-sdk-for-ruby:${{ env.GITHUB_REF }}-OV5.6
run: docker build . --file Dockerfile --tag hewlettpackardenterprise/hpe-oneview-sdk-for-ruby:${{ env.GITHUB_REF }}-OV6.0
- name: Push the tagged Docker image
run: docker push hewlettpackardenterprise/hpe-oneview-sdk-for-ruby:${{ env.GITHUB_REF }}-OV5.6
run: docker push hewlettpackardenterprise/hpe-oneview-sdk-for-ruby:${{ env.GITHUB_REF }}-OV6.0
52 changes: 26 additions & 26 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,9 +2,9 @@

## Build Status

OV Version | 5.60 | 5.50 | 5.40 | 5.30 |
OV Version | 6.00 | 5.60 | 5.50 | 5.40 |
| ------------- |:-------------:| -------------:| -------------:| -------------:|
SDK Version/Tag | [Master](https://github.com/HewlettPackard/oneview-sdk-ruby/tree/master) | [v5.17.0](https://github.com/HewlettPackard/oneview-sdk-ruby/releases/tag/v5.17.0) | [v5.16.0](https://github.com/HewlettPackard/oneview-sdk-ruby/releases/tag/v5.16.0) | [v5.15.0](https://github.com/HewlettPackard/oneview-sdk-ruby/releases/tag/v5.15.0) |
SDK Version/Tag | [v6.0.0](https://github.com/HewlettPackard/oneview-sdk-ruby/releases/tag/v6.0.0) | [v5.18.0](https://github.com/HewlettPackard/oneview-sdk-ruby/releases/tag/v5.18.0) | [v5.17.0](https://github.com/HewlettPackard/oneview-sdk-ruby/releases/tag/v5.17.0) | [v5.16.0](https://github.com/HewlettPackard/oneview-sdk-ruby/releases/tag/v5.16.0) |
Build Status | ![Build status](https://ci.appveyor.com/api/projects/status/u84505l6syp70013?svg=true)| ![Build status](https://ci.appveyor.com/api/projects/status/u84505l6syp70013?svg=true)| ![Build status](https://ci.appveyor.com/api/projects/status/u84505l6syp70013?svg=true)| ![Build status](https://ci.appveyor.com/api/projects/status/u84505l6syp70013?svg=true)|


Expand All @@ -18,7 +18,7 @@ You can find the latest supported HPE OneView Ruby SDK [here](https://github.com

## What's New

HPE OneView Ruby library extends support of the SDK to OneView REST API version 2400 (OneView v5.60)
HPE OneView Ruby library extends support of the SDK to OneView REST API version 2600 (OneView v6.00)

Please refer to [notes](https://github.com/HewlettPackard/oneview-sdk-ruby/blob/master/CHANGELOG.md) for more information on the changes , features supported and issues fixed in this version

Expand All @@ -34,17 +34,17 @@ The light weight containerized version of the HPE OneView SDK for Ruby is availa

```bash
# Download and store a local copy of oneview-sdk-ruby and use it as a Docker Image.
$ docker pull hewlettpackardenterprise/hpe-oneview-sdk-for-ruby:v5.18.0-OV5.6
$ docker pull hewlettpackardenterprise/hpe-oneview-sdk-for-ruby:v6.0.0-OV6.0
# Run docker commands below given, which will in turn create a sh session
# where you can create files, issue commands and execute the examples.
$ docker run -it hewlettpackardenterprise/hpe-oneview-sdk-for-ruby:v5.18.0-OV5.6 /bin/sh
$ docker run -it hewlettpackardenterprise/hpe-oneview-sdk-for-ruby:v6.0.0-OV6.0 /bin/sh
```

### Local Setup
- Local installation requires the gem in your Gemfile:

```ruby
gem 'oneview-sdk', '~> 5.18'
gem 'oneview-sdk', '~> 6.0.0'
```

Then run `$ bundle install`
Expand Down Expand Up @@ -72,7 +72,7 @@ client = OneviewSDK::Client.new(
logger: Logger.new(STDOUT), # This is the default
log_level: :info, # This is the default
domain: 'LOCAL', # This is the default
api_version: 2400 # Defaults to appliance's max API version which is API version of OneView 5.60
api_version: 2600 # Defaults to appliance's max API version which is API version of OneView 6.00
)
```

Expand All @@ -93,7 +93,7 @@ i3s_client = OneviewSDK::ImageStreamer::Client.new(
ssl_enabled: true, # This is the default and strongly encouraged
logger: Logger.new(STDOUT), # This is the default
log_level: :info, # This is the default
api_version: 2000 # Defaults to appliance's max API version
api_version: 2010 # Defaults to appliance's max API version
)
```

Expand All @@ -107,7 +107,7 @@ i3s_client = client.new_i3s_client(
ssl_enabled: true, # This is the default and strongly encouraged
logger: Logger.new(STDOUT), # This is the default
log_level: :info, # This is the default
api_version: 2000 # Defaults to appliance's max API version
api_version: 2010 # Defaults to appliance's max API version
)
```

Expand Down Expand Up @@ -165,7 +165,7 @@ Configuration files can also be used to define client configuration (json or yam
"url": "https://oneview.example.com",
"user": "Administrator",
"password": "secret123",
"api_version": 2400
"api_version": 2600
}
```

Expand Down Expand Up @@ -203,20 +203,20 @@ You may notice resource classes being accessed in a few different ways; for exam
require 'oneview-sdk'

# Show defaults:
OneviewSDK::SUPPORTED_API_VERSIONS # [1000, 1200, 1600, 1800, 2000, 2200, 2400]
OneviewSDK::DEFAULT_API_VERSION # 2400
OneviewSDK.api_version # 2400
OneviewSDK::SUPPORTED_API_VERSIONS # [1000, 1200, 1600, 1800, 2000, 2200, 2600]
OneviewSDK::DEFAULT_API_VERSION # 2600
OneviewSDK.api_version # 2600
OneviewSDK.api_version_updated? # false

# Notice the automatic redirection/resolution when we use the shorthand accessor:
OneviewSDK::EthernetNetwork # OneviewSDK::API2400::EthernetNetwork
OneviewSDK::EthernetNetwork # OneviewSDK::API2600::EthernetNetwork

# Even this comparison is true:
OneviewSDK::EthernetNetwork == OneviewSDK::API2400::EthernetNetwork # true
OneviewSDK::EthernetNetwork == OneviewSDK::API2600::EthernetNetwork # true

# Now let's set a new API version default:
OneviewSDK.api_version = 2400
OneviewSDK.api_version # 2400
OneviewSDK.api_version = 2600
OneviewSDK.api_version # 2600
OneviewSDK.api_version_updated? # true

# The API300 and above has 2 variants (C7000 & Synergy): For eg
Expand All @@ -236,19 +236,19 @@ OneviewSDK::API2200::DEFAULT_VARIANT # 'C7000'
OneviewSDK::API2200.variant # 'C7000'
OneviewSDK::API2200.variant_updated? # false

OneviewSDK::API2400::SUPPORTED_VARIANTS # ['C7000', 'Synergy']
OneviewSDK::API2400::DEFAULT_VARIANT # 'C7000'
OneviewSDK::API2400.variant # 'C7000'
OneviewSDK::API2400.variant_updated? # false
OneviewSDK::API2600::SUPPORTED_VARIANTS # ['C7000', 'Synergy']
OneviewSDK::API2600::DEFAULT_VARIANT # 'C7000'
OneviewSDK::API2600.variant # 'C7000'
OneviewSDK::API2600.variant_updated? # false

# Likewise, we can set a new default variant for the API2400 module:
OneviewSDK::2400.variant = 'Synergy'
OneviewSDK::API2400.variant # 'Synergy'
OneviewSDK::API2400.variant_updated? # true
# Likewise, we can set a new default variant for the API2600 module:
OneviewSDK::2600.variant = 'Synergy'
OneviewSDK::API2600.variant # 'Synergy'
OneviewSDK::API2600.variant_updated? # true

```

:lock: Tip: We understand that this can be confusing, so to avoid any confusion or unexpected behavior, we recommend specifying the full namespace identifier in your code. At the very least, set defaults explicitly using `OneviewSDK.api_version = <ver>` and `OneviewSDK::API2400.variant = <variant>`, as the defaults may change.
:lock: Tip: We understand that this can be confusing, so to avoid any confusion or unexpected behavior, we recommend specifying the full namespace identifier in your code. At the very least, set defaults explicitly using `OneviewSDK.api_version = <ver>` and `OneviewSDK::API2600.variant = <variant>`, as the defaults may change.

## Resources
Each OneView and Image Streamer resource is exposed via a Ruby class, enabling CRUD-like functionality (with some exceptions).
Expand Down
4 changes: 2 additions & 2 deletions examples/_client.rb.example
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ require 'pry'
user: 'Administrator', # or set ENV['ONEVIEWSDK_USER']
password: 'secret123', # or set ENV['ONEVIEWSDK_PASSWORD']
ssl_enabled: false,
api_version: 2400
api_version: 2600
)

## This setting allows the SDK to flush messages to the screen as it is being run.
Expand All @@ -16,7 +16,7 @@ require 'pry'

# This setting allows for use of the shortened name of the resources, like OneviewSDK::<Resource_name>,
# when referring to OneviewSDK::<API_version>::Synergy::<Resource_name>
# Versions supported: [200, 300, 500, 600, 800, 1000, 1200, 1600, 1800, 2000, 2200, 2400]
# Versions supported: [200, 300, 500, 600, 800, 1000, 1200, 1600, 1800, 2000, 2200, 2400, 2600]
# Variants supported[C7000, Synergy]
# OneviewSDK::API<version>.variant='Synergy'

Expand Down
2 changes: 1 addition & 1 deletion lib/oneview-sdk/version.rb
Original file line number Diff line number Diff line change
Expand Up @@ -11,5 +11,5 @@

# Gem version defined here
module OneviewSDK
VERSION = '5.18.0'.freeze
VERSION = '6.0.0'.freeze
end

0 comments on commit d5461bb

Please sign in to comment.