Class: OneviewSDK::ImageStreamer::API500::DeploymentPlan

Inherits:
OneviewSDK::ImageStreamer::API300::DeploymentPlan show all
Defined in:
lib/oneview-sdk/image-streamer/resource/api500/deployment_plan.rb

Overview

Deployment Plan resource implementation for Image Streamer

Constant Summary

Constants inherited from OneviewSDK::ImageStreamer::API300::DeploymentPlan

OneviewSDK::ImageStreamer::API300::DeploymentPlan::BASE_URI

Constants inherited from Resource

Resource::BASE_URI, Resource::DEFAULT_REQUEST_HEADER, Resource::UNIQUE_IDENTIFIERS

Instance Attribute Summary

Attributes inherited from Resource

#api_version, #client, #data, #logger

Instance Method Summary collapse

Methods inherited from Resource

#==, #[], #[]=, build_query, #create, #create!, #deep_merge!, #delete, #each, #eql?, #exists?, find_by, find_with_pagination, from_file, get_all, get_all_with_query, #like?, #refresh, #retrieve!, #schema, schema, #set, #set_all, #to_file, #update

Constructor Details

#initialize(client, params = {}, api_ver = nil) ⇒ DeploymentPlan

Create a resource object, associate it with a client, and set its properties.

Parameters:

  • client (OneviewSDK::ImageStreamer::Client)

    The client object for the OneView appliance

  • params (Hash) (defaults to: {})

    The options for this resource (key-value pairs)

  • api_ver (Integer) (defaults to: nil)

    The api version to use when interracting with this resource.



24
25
26
27
28
29
# File 'lib/oneview-sdk/image-streamer/resource/api500/deployment_plan.rb', line 24

def initialize(client, params = {}, api_ver = nil)
  @data ||= {}
  # Default values:
  @data['type'] ||= 'OEDeploymentPlanV5'
  super
end

Instance Method Details

#get_used_byHash

Retrieves the Deployment Plan details as per the selected attributes.

Returns:

  • (Hash)

    The OS Deployment Plan.



33
34
35
36
37
38
# File 'lib/oneview-sdk/image-streamer/resource/api500/deployment_plan.rb', line 33

def get_used_by
  ensure_client && ensure_uri
  path = "#{BASE_URI}/#{@data['uri'].split('/').last}/usedby/"
  response = @client.rest_get(path, { 'Content-Type' => 'none' }, @api_version)
  @client.response_handler(response)
end