Skip to content

Commit

Permalink
Merge 8e0eba0 into d5461bb
Browse files Browse the repository at this point in the history
  • Loading branch information
AsisBagga committed Apr 9, 2021
2 parents d5461bb + 8e0eba0 commit a7f7fcd
Show file tree
Hide file tree
Showing 151 changed files with 3,181 additions and 337 deletions.
2 changes: 1 addition & 1 deletion .rubocop.yml
Expand Up @@ -38,7 +38,7 @@ Metrics/PerceivedComplexity:
Enabled: false

Style/GlobalVars:
AllowedVariables: [$config, $secrets, $client, $client_120, $client_300, $client_300_synergy, $config_synergy, $secrets_synergy, $config_i3s, $client_i3s_300, $client_500, $client_500_synergy, $client_i3s_500, $client_600, $client_600_synergy, $client_i3s_600, $client_800, $client_800_synergy, $client_1000, $client_1000_synergy, $client_1200, $client_1200_synergy, $client_1600, $client_1600_synergy, $client_1800, $client_1800_synergy, $client_2000, $client_2000_synergy, $client_2200, $client_2200_synergy, $client_2400, $client_2400_synergy, $client_2600, $client_2600_synergy]
AllowedVariables: [$config, $secrets, $client, $client_120, $client_300, $client_300_synergy, $config_synergy, $secrets_synergy, $config_i3s, $client_i3s_300, $client_500, $client_500_synergy, $client_i3s_500, $client_600, $client_600_synergy, $client_i3s_600, $client_800, $client_800_synergy, $client_1000, $client_1000_synergy, $client_1200, $client_1200_synergy, $client_1600, $client_1600_synergy, $client_1800, $client_1800_synergy, $client_2000, $client_2000_synergy, $client_2200, $client_2200_synergy, $client_2400, $client_2400_synergy, $client_2600, $client_2600_synergy, $client_2800, $client_2800_synergy]

Style/FrozenStringLiteralComment:
Enabled: false
Expand Down
42 changes: 42 additions & 0 deletions CHANGELOG.md
@@ -1,3 +1,45 @@
## 6.1.0 (Unreleased)
#### Notes
Extends support of the SDK to OneView REST API version 2800 (OneView v6.10) and ImageStreamer REST API version 2020 (I3S v6.10).

#### Features supported
- Artifact Bundle
- Build Plan
- Connection Template
- Deployment Group
- Deployment Plan
- Enclosure
- Enclosure Group
- Ethernet Network
- FC Network
- FCOE Network
- Firmware Driver
- Golden Image
- Hypervisor Cluster Profile
- Hypervisor Manager
- Interconnects
- Interconnect Type
- LIG Uplink Set
- Logical Enclosure
- Logical Interconnect
- Logical Interconnect Group
- Network Set
- OS Deployment Plan
- OS Volume
- Plan Script
- Scope
- Server Certificate
- Server Hardware
- Server Hardware Type
- Server Profile
- Server Profile Template
- Storage Pool
- Storage System
- Uplink Set
- Volume
- Volume Attachment
- Volume Template

## 6.0.0
#### Notes
Extends support of the SDK to OneView REST API version 2600 (OneView v6.00) and ImageStreamer REST API version 2010 (I3S v6.00).
Expand Down
616 changes: 308 additions & 308 deletions endpoints-support.md

Large diffs are not rendered by default.

6 changes: 4 additions & 2 deletions examples/image-streamer/artifact_bundle.rb
@@ -1,4 +1,4 @@
# (C) Copyright 2020 Hewlett Packard Enterprise Development LP
# (C) Copyright 2021 Hewlett Packard Enterprise Development LP
#
# Licensed under the Apache License, Version 2.0 (the "License");
# You may not use this file except in compliance with the License.
Expand All @@ -13,13 +13,15 @@
require_relative '../_client_i3s' # Gives access to @client

# Supported APIs:
# - 1000, 1020, 1600, 2000
# - 1000, 1020, 1600, 2000, 2010, 2020

# Resources that can be created according to parameters:
# api_version = 1000 & variant = Synergy to OneviewSDK::ImageStreamer::API1000::ArtifactBundle
# api_version = 1020 & variant = Synergy to OneviewSDK::ImageStreamer::API1020::ArtifactBundle
# api_version = 1600 & variant = Synergy to OneviewSDK::ImageStreamer::API1600::ArtifactBundle
# api_version = 2000 & variant = Synergy to OneviewSDK::ImageStreamer::API2000::ArtifactBundle
# api_version = 2010 & variant = Synergy to OneviewSDK::ImageStreamer::API2010::ArtifactBundle
# api_version = 2020 & variant = Synergy to OneviewSDK::ImageStreamer::API2020::ArtifactBundle

# Example:
# - Create, update, download, upload, extract and delete an artifact bundle for an Image Streamer
Expand Down
6 changes: 4 additions & 2 deletions examples/image-streamer/build_plan.rb
@@ -1,4 +1,4 @@
# (C) Copyright 2020 Hewlett Packard Enterprise Development LP
# (C) Copyright 2021 Hewlett Packard Enterprise Development LP
#
# Licensed under the Apache License, Version 2.0 (the "License");
# You may not use this file except in compliance with the License.
Expand All @@ -11,12 +11,14 @@

require_relative '../_client_i3s' # Gives access to @client
# Supported APIs:
# - 1000, 1020, 2000
# - 1000, 1020, 2000, 2010, 2020

# Resources that can be created according to parameters:
# api_version = 1000 & variant = Synergy to OneviewSDK::ImageStreamer::API1000::BuildPlan
# api_version = 1020 & variant = Synergy to OneviewSDK::ImageStreamer::API1020::BuildPlan
# api_version = 2000 & variant = Synergy to OneviewSDK::ImageStreamer::API2000::BuildPlan
# api_version = 2010 & variant = Synergy to OneviewSDK::ImageStreamer::API2010::BuildPlan
# api_version = 2020 & variant = Synergy to OneviewSDK::ImageStreamer::API2020::BuildPlan

# Example: Create a build plan for an Image Streamer
# NOTE: This will create three build plans with the following names 'Build_Plan_1', 'Build_Plan_2' and 'Build_Plan_3', then delete them.
Expand Down
6 changes: 4 additions & 2 deletions examples/image-streamer/deployment_group.rb
@@ -1,4 +1,4 @@
# (C) Copyright 2020 Hewlett Packard Enterprise Development LP
# (C) Copyright 2021 Hewlett Packard Enterprise Development LP
#
# Licensed under the Apache License, Version 2.0 (the "License");
# You may not use this file except in compliance with the License.
Expand All @@ -12,13 +12,15 @@
require_relative '../_client_i3s' # Gives access to @client

# Supported APIs:
# - 1000, 1020, 1600, 2000
# - 1000, 1020, 1600, 2000, 2010, 2020

# Resources that can be created according to parameters:
# api_version = 1000 & variant = Synergy to OneviewSDK::ImageStreamer::API1000::DeploymentGroup
# api_version = 1020 & variant = Synergy to OneviewSDK::ImageStreamer::API1020::DeploymentGroup
# api_version = 1600 & variant = Synergy to OneviewSDK::ImageStreamer::API1600::DeploymentGroup
# api_version = 2000 & variant = Synergy to OneviewSDK::ImageStreamer::API2000::DeploymentGroup
# api_version = 2010 & variant = Synergy to OneviewSDK::ImageStreamer::API2010::DeploymentGroup
# api_version = 2020 & variant = Synergy to OneviewSDK::ImageStreamer::API2020::DeploymentGroup

# Example:
# - Gets the Deployment Groups
Expand Down
4 changes: 3 additions & 1 deletion examples/image-streamer/deployment_plan.rb
@@ -1,4 +1,4 @@
# (C) Copyright 2020 Hewlett Packard Enterprise Development LP
# (C) Copyright 2021 Hewlett Packard Enterprise Development LP
#
# Licensed under the Apache License, Version 2.0 (the "License");
# You may not use this file except in compliance with the License.
Expand All @@ -18,6 +18,8 @@
# api_version = 1020 & variant = Synergy to OneviewSDK::ImageStreamer::API1020::DeploymentPlan
# api_version = 1600 & variant = Synergy to OneviewSDK::ImageStreamer::API1600::DeploymentPlan
# api_version = 2000 & variant = Synergy to OneviewSDK::ImageStreamer::API2000::DeploymentPlan
# api_version = 2010 & variant = Synergy to OneviewSDK::ImageStreamer::API2010::DeploymentPlan
# api_version = 2020 & variant = Synergy to OneviewSDK::ImageStreamer::API2020::DeploymentPlan

# Example: Create a deployment plan for an Image Streamer
# NOTE: This will create a deployment plan named 'Deployment_Plan_1', then delete it.
Expand Down
6 changes: 4 additions & 2 deletions examples/image-streamer/golden_image.rb
@@ -1,4 +1,4 @@
# (C) Copyright 2020 Hewlett Packard Enterprise Development LP
# (C) Copyright 2021 Hewlett Packard Enterprise Development LP
#
# Licensed under the Apache License, Version 2.0 (the "License");
# You may not use this file except in compliance with the License.
Expand All @@ -11,12 +11,14 @@

require_relative '../_client_i3s' # Gives access to @client
# Supported APIs:
# - 1000, 1020, 2000
# - 1000, 1020, 2000, 2010, 2020

# Resources that can be created according to parameters:
# api_version = 1000 & variant = Synergy to OneviewSDK::ImageStreamer::API1000::GoldenImage
# api_version = 1020 & variant = Synergy to OneviewSDK::ImageStreamer::API1020::GoldenImage
# api_version = 2000 & variant = Synergy to OneviewSDK::ImageStreamer::API2000::GoldenImage
# api_version = 2010 & variant = Synergy to OneviewSDK::ImageStreamer::API2010::GoldenImage
# api_version = 2020 & variant = Synergy to OneviewSDK::ImageStreamer::API2020::GoldenImage

# Example: Create a golden image for an Image Streamer
# NOTE: This will create a golden images named 'Golden_Image_1' and 'Golden_Image_2', and then, it will delete them.
Expand Down
6 changes: 4 additions & 2 deletions examples/image-streamer/os_volume.rb
@@ -1,4 +1,4 @@
# (C) Copyright 2020 Hewlett Packard Enterprise Development LP
# (C) Copyright 2021 Hewlett Packard Enterprise Development LP
#
# Licensed under the Apache License, Version 2.0 (the "License");
# You may not use this file except in compliance with the License.
Expand All @@ -11,12 +11,14 @@

require_relative '../_client_i3s' # Gives access to @client
# Supported APIs:
# - 1000, 1020, 2000
# - 1000, 1020, 2000, 2010, 2020

# Resources that can be created according to parameters:
# api_version = 1000 & variant = Synergy to OneviewSDK::ImageStreamer::API1000::OSVolume
# api_version = 1020 & variant = Synergy to OneviewSDK::ImageStreamer::API1020::OSVolume
# api_version = 2000 & variant = Synergy to OneviewSDK::ImageStreamer::API2000::OSVolume
# api_version = 2010 & variant = Synergy to OneviewSDK::ImageStreamer::API2010::OSVolume
# api_version = 2020 & variant = Synergy to OneviewSDK::ImageStreamer::API2020::OSVolume

# Example: Os Volume for an Image Streamer
# NOTE: You must have one os volume.
Expand Down
6 changes: 4 additions & 2 deletions examples/image-streamer/plan_script.rb
@@ -1,4 +1,4 @@
# (C) Copyright 2020 Hewlett Packard Enterprise Development LP
# (C) Copyright 2021 Hewlett Packard Enterprise Development LP
#
# Licensed under the Apache License, Version 2.0 (the "License");
# You may not use this file except in compliance with the License.
Expand All @@ -12,12 +12,14 @@
require_relative '../_client_i3s' # Gives access to @client

# Supported APIs:
# - 1000, 1020, 2000
# - 1000, 1020, 2000, 2010, 2020

# Resources that can be created according to parameters:
# api_version = 1000 & variant = Synergy to OneviewSDK::ImageStreamer::API1000::PlanScript
# api_version = 1020 & variant = Synergy to OneviewSDK::ImageStreamer::API1020::PlanScript
# api_version = 2000 & variant = Synergy to OneviewSDK::ImageStreamer::API2000::PlanScript
# api_version = 2010 & variant = Synergy to OneviewSDK::ImageStreamer::API2010::PlanScript
# api_version = 2020 & variant = Synergy to OneviewSDK::ImageStreamer::API2020::PlanScript

# Example: Create a plan script for an Image Streamer
# NOTE: This will create a plan script named 'Plan_Script_1', then delete it.
Expand Down
4 changes: 2 additions & 2 deletions lib/oneview-sdk.rb
@@ -1,4 +1,4 @@
# (c) Copyright 2020 Hewlett Packard Enterprise Development LP
# (c) Copyright 2021 Hewlett Packard Enterprise Development LP
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
Expand Down Expand Up @@ -26,7 +26,7 @@ module OneviewSDK
env_i3s = %w[I3S_URL I3S_SSL_ENABLED]
ENV_VARS = env_sdk.concat(env_i3s).freeze

SUPPORTED_API_VERSIONS = [200, 300, 500, 600, 800, 1000, 1200, 1600, 1800, 2000, 2200, 2400, 2600].freeze
SUPPORTED_API_VERSIONS = [200, 300, 500, 600, 800, 1000, 1200, 1600, 1800, 2000, 2200, 2400, 2600, 2800].freeze
DEFAULT_API_VERSION = 200
@api_version = DEFAULT_API_VERSION
@api_version_updated = false # Whether or not the API version has been set by the user
Expand Down
39 changes: 39 additions & 0 deletions lib/oneview-sdk/image-streamer/resource/api2020.rb
@@ -0,0 +1,39 @@
# (c) Copyright 2020 Hewlett Packard Enterprise Development LP
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writing, software distributed
# under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR
# CONDITIONS OF ANY KIND, either express or implied. See the License for the specific
# language governing permissions and limitations under the License.

require_relative '../../resource'

module OneviewSDK
# Module Image Streamer
module ImageStreamer
# Module API 2020
module API2020
# Get resource class that matches the type given
# @param [String] type Name of the desired class type
# @param [String] variant There is only 1 variant for this module, so this is not used.
# It exists only so that the parameters match API modules that do have multiple variants.
# @return [Class] Resource class or nil if not found
def self.resource_named(type, _variant = nil)
new_type = type.to_s.downcase.gsub(/[ -_]/, '')
constants.each do |c|
klass = const_get(c)
next unless klass.is_a?(Class) && klass < OneviewSDK::Resource
name = klass.name.split('::').last.downcase.delete('_').delete('-')
return klass if new_type =~ /^#{name}[s]?$/
end
nil
end
end
end
end

# Load all API-specific resources:
Dir[File.dirname(__FILE__) + '/api2020/*.rb'].each { |file| require file }
22 changes: 22 additions & 0 deletions lib/oneview-sdk/image-streamer/resource/api2020/artifact_bundle.rb
@@ -0,0 +1,22 @@
# (C) Copyright 2021 Hewlett Packard Enterprise Development LP
#
# Licensed under the Apache License, Version 2.0 (the "License");
# You may not use this file except in compliance with the License.
# You may obtain a copy of the License at http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writing, software distributed
# under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR
# CONDITIONS OF ANY KIND, either express or implied. See the License for the specific
# language governing permissions and limitations under the License.

require_relative '../api2010/artifact_bundle'

module OneviewSDK
module ImageStreamer
module API2020
# Artifact Bundle resource implementation for Image Streamer
class ArtifactBundle < OneviewSDK::ImageStreamer::API2010::ArtifactBundle
end
end
end
end
22 changes: 22 additions & 0 deletions lib/oneview-sdk/image-streamer/resource/api2020/build_plan.rb
@@ -0,0 +1,22 @@
# (C) Copyright 2021 Hewlett Packard Enterprise Development LP
#
# Licensed under the Apache License, Version 2.0 (the "License");
# You may not use this file except in compliance with the License.
# You may obtain a copy of the License at http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writing, software distributed
# under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR
# CONDITIONS OF ANY KIND, either express or implied. See the License for the specific
# language governing permissions and limitations under the License.

require_relative '../api2010/build_plan'

module OneviewSDK
module ImageStreamer
module API2020
# Build Plan resource implementation for Image Streamer
class BuildPlan < OneviewSDK::ImageStreamer::API2010::BuildPlan
end
end
end
end
@@ -0,0 +1,22 @@
# (C) Copyright 2021 Hewlett Packard Enterprise Development LP
#
# Licensed under the Apache License, Version 2.0 (the "License");
# You may not use this file except in compliance with the License.
# You may obtain a copy of the License at http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writing, software distributed
# under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR
# CONDITIONS OF ANY KIND, either express or implied. See the License for the specific
# language governing permissions and limitations under the License.

require_relative '../api2010/deployment_group'

module OneviewSDK
module ImageStreamer
module API2020
# Deployment Group resource implementation for Image Streamer
class DeploymentGroup < OneviewSDK::ImageStreamer::API2010::DeploymentGroup
end
end
end
end
22 changes: 22 additions & 0 deletions lib/oneview-sdk/image-streamer/resource/api2020/deployment_plan.rb
@@ -0,0 +1,22 @@
# (C) Copyright 2021 Hewlett Packard Enterprise Development LP
#
# Licensed under the Apache License, Version 2.0 (the "License");
# You may not use this file except in compliance with the License.
# You may obtain a copy of the License at http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writing, software distributed
# under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR
# CONDITIONS OF ANY KIND, either express or implied. See the License for the specific
# language governing permissions and limitations under the License.

require_relative '../api2010/deployment_plan'

module OneviewSDK
module ImageStreamer
module API2020
# Deployment Plan resource implementation for Image Streamer
class DeploymentPlan < OneviewSDK::ImageStreamer::API2010::DeploymentPlan
end
end
end
end
22 changes: 22 additions & 0 deletions lib/oneview-sdk/image-streamer/resource/api2020/golden_image.rb
@@ -0,0 +1,22 @@
# (C) Copyright 2021 Hewlett Packard Enterprise Development LP
#
# Licensed under the Apache License, Version 2.0 (the "License");
# You may not use this file except in compliance with the License.
# You may obtain a copy of the License at http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writing, software distributed
# under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR
# CONDITIONS OF ANY KIND, either express or implied. See the License for the specific
# language governing permissions and limitations under the License.

require_relative '../api2010/golden_image'

module OneviewSDK
module ImageStreamer
module API2020
# Golden Image resource implementation for Image Streamer
class GoldenImage < OneviewSDK::ImageStreamer::API2010::GoldenImage
end
end
end
end
22 changes: 22 additions & 0 deletions lib/oneview-sdk/image-streamer/resource/api2020/os_volume.rb
@@ -0,0 +1,22 @@
# (C) Copyright 2021 Hewlett Packard Enterprise Development LP
#
# Licensed under the Apache License, Version 2.0 (the "License");
# You may not use this file except in compliance with the License.
# You may obtain a copy of the License at http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writing, software distributed
# under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR
# CONDITIONS OF ANY KIND, either express or implied. See the License for the specific
# language governing permissions and limitations under the License.

require_relative '../api2010/os_volume'

module OneviewSDK
module ImageStreamer
module API2020
# OS Volume resource implementation for Image Streamer
class OSVolume < OneviewSDK::ImageStreamer::API2010::OSVolume
end
end
end
end

0 comments on commit a7f7fcd

Please sign in to comment.