class OneviewSDK::API300::C7000::ServerProfileTemplate

Server Profile Template resource implementation on API300 C7000

Public Class Methods

new(client, params = {}, api_ver = nil) click to toggle source

Create a resource object, associate it with a client, and set its properties. @param [OneviewSDK::Client] client The client object for the OneView appliance @param [Hash] params The options for this resource (key-value pairs) @param [Integer] api_ver The api version to use when interracting with this resource.

# File lib/oneview-sdk/resource/api300/c7000/server_profile_template.rb, line 24
def initialize(client, params = {}, api_ver = nil)
  @data ||= {}
  # Default values
  @data['type'] ||= 'ServerProfileTemplateV2'
  super
end

Public Instance Methods

get_transformation(client, query = nil) click to toggle source

Transforms an existing profile template by supplying a new server hardware type and/or enclosure group. A profile template will be returned with a new configuration based on the capabilities of the supplied server hardware type and/or enclosure group. All configured connections will have their port assignment set to 'Auto'. The new profile template can subsequently be used for the PUT {appl}/rest/server-profile-templates/{id} API but is not guaranteed to pass validation. Any incompatibilities will be flagged when the transformed server profile template is submitted. @param [OneviewSDK::Client] client The client object for the OneView appliance @param [Hash] query Query parameters @option query [OneviewSDK::EnclosureGroup] 'enclosure_group' Enclosure Group associated with the resource @option query [OneviewSDK::ServerHardwareType] 'server_hardware_type' The server hardware type associated with the resource @return [Hash] Hash containing the required information

# File lib/oneview-sdk/resource/api300/c7000/server_profile_template.rb, line 42
def get_transformation(client, query = nil)
  query_uri = OneviewSDK::Resource.build_query(query) if query
  response = client.rest_get("#{@data['uri']}/transformation#{query_uri}")
  client.response_handler(response)
end