Class: OneviewSDK::API500::Synergy::ServerProfileTemplate

Inherits:
C7000::ServerProfileTemplate show all
Defined in:
lib/oneview-sdk/resource/api500/synergy/server_profile_template.rb

Overview

Server Profile Template resource implementation for API500 Synergy

Constant Summary

Constants inherited from OneviewSDK::API200::ServerProfileTemplate

OneviewSDK::API200::ServerProfileTemplate::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 C7000::ServerProfileTemplate

#add_connection, #create_volume_with_attachment, #initialize, #remove_connection

Methods inherited from OneviewSDK::API300::C7000::ServerProfileTemplate

#get_transformation, #initialize

Methods inherited from OneviewSDK::API200::ServerProfileTemplate

#add_connection, #add_volume_attachment, #create_volume_with_attachment, #get_available_hardware, #initialize, #new_profile, #remove_connection, #remove_volume_attachment, #set_enclosure_group, #set_firmware_driver, #set_server_hardware_type

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, #initialize, #like?, #refresh, #retrieve!, schema, #schema, #set, #set_all, #to_file, #update

Constructor Details

This class inherits a constructor from OneviewSDK::API500::C7000::ServerProfileTemplate

Instance Method Details

#set_os_deployment_settings(os_deployment_plan, custom_attributes = []) ⇒ Object

Sets the OS deployment settings applicable when deployment is invoked through server profile template

Parameters:

  • os_deployment_plan (OneviewSDK::API500::Synergy::OSDeploymentPlan)

    the OSDeploymentPlan resource with valid URI.

  • custom_attributes (Array(Hash<String, String>)) (defaults to: [])

    The custom attributes to be configured on the OS deployment plan. The internal hashes may contain:

    • ‘name’ [String] name of the attribute

    • ‘value’ [String] value of the attribute

Raises:



27
28
29
30
31
32
# File 'lib/oneview-sdk/resource/api500/synergy/server_profile_template.rb', line 27

def set_os_deployment_settings(os_deployment_plan, custom_attributes = [])
  raise IncompleteResource, 'OS Deployment Plan not found!' unless os_deployment_plan.retrieve!
  self['osDeploymentSettings'] ||= {}
  self['osDeploymentSettings']['osDeploymentPlanUri'] = os_deployment_plan['uri']
  self['osDeploymentSettings']['osCustomAttributes'] = custom_attributes
end