Class: OneviewSDK::ManagedSAN

Inherits:
Resource
  • Object
show all
Defined in:
lib/oneview-sdk/resource/managed_san.rb

Overview

Power device resource implementation

Constant Summary collapse

BASE_URI =
'/rest/fc-sans/managed-sans'.freeze

Instance Attribute Summary

Attributes inherited from Resource

#api_version, #client, #data, #logger

Instance Method Summary collapse

Methods inherited from Resource

#==, #[], #[]=, build_query, #create!, #each, #eql?, #exists?, find_by, from_file, get_all, #initialize, #like?, #refresh, #retrieve!, #schema, schema, #set, #set_all, #to_file

Constructor Details

This class inherits a constructor from OneviewSDK::Resource

Instance Method Details

#createObject

Method is not available

Raises:



19
20
21
# File 'lib/oneview-sdk/resource/managed_san.rb', line 19

def create
  unavailable_method
end

#deleteObject

Method is not available

Raises:



25
26
27
# File 'lib/oneview-sdk/resource/managed_san.rb', line 25

def delete
  unavailable_method
end

#get_endpointsArray

Retrieves a list of endpoints

Returns:

  • (Array)

    List of endpoints



37
38
39
40
# File 'lib/oneview-sdk/resource/managed_san.rb', line 37

def get_endpoints
  response = @client.rest_get(@data['uri'] + '/endpoints')
  @client.response_handler(response)['members']
end

#get_zoning_reportObject

Creates unexpected zoning report for a SAN



74
75
76
77
# File 'lib/oneview-sdk/resource/managed_san.rb', line 74

def get_zoning_report
  response = @client.rest_post(@data['uri'] + '/issues', 'body' => {})
  @client.response_handler(response)
end

#set_public_attributes(attributes) ⇒ Object

Set public attributes

Parameters:

  • attributes (Hash)

    Public attributes

Options Hash (attributes):

  • :name (String)
  • :value (String)
  • :valueType (String)
  • :valueFormat (String)


55
56
57
58
# File 'lib/oneview-sdk/resource/managed_san.rb', line 55

def set_public_attributes(attributes)
  response = @client.rest_put(@data['uri'], 'body' => { publicAttributes: attributes })
  @client.response_handler(response)
end

#set_refresh_state(state) ⇒ Object

Set refresh state for managed SAN

Parameters:

  • state (String)

    Desired refresh state



44
45
46
47
# File 'lib/oneview-sdk/resource/managed_san.rb', line 44

def set_refresh_state(state)
  response = @client.rest_put(@data['uri'], 'body' => { refreshState: state })
  @client.response_handler(response)
end

#set_san_policy(policy) ⇒ Object

Set public attributes

Parameters:

  • policy (Hash)

    SAN policy

  • attributes (Hash)

    a customizable set of options



68
69
70
71
# File 'lib/oneview-sdk/resource/managed_san.rb', line 68

def set_san_policy(policy)
  response = @client.rest_put(@data['uri'], 'body' => { sanPolicy: policy })
  @client.response_handler(response)
end

#updateObject

Method is not available

Raises:



31
32
33
# File 'lib/oneview-sdk/resource/managed_san.rb', line 31

def update
  unavailable_method
end