Class: OneviewSDK::API200::ManagedSAN

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

Overview

Managed SAN resource implementation

Direct Known Subclasses

OneviewSDK::API300::C7000::ManagedSAN

Constant Summary collapse

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

Constants inherited from Resource

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!, #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:


22
23
24
# File 'lib/oneview-sdk/resource/api200/managed_san.rb', line 22

def create(*)
  unavailable_method
end

#deleteObject

Method is not available

Raises:


28
29
30
# File 'lib/oneview-sdk/resource/api200/managed_san.rb', line 28

def delete(*)
  unavailable_method
end

#get_endpointsArray

Retrieves a list of endpoints

Returns:

  • (Array)

    List of endpoints


40
41
42
43
# File 'lib/oneview-sdk/resource/api200/managed_san.rb', line 40

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


77
78
79
80
# File 'lib/oneview-sdk/resource/api200/managed_san.rb', line 77

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)

58
59
60
61
# File 'lib/oneview-sdk/resource/api200/managed_san.rb', line 58

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


47
48
49
50
# File 'lib/oneview-sdk/resource/api200/managed_san.rb', line 47

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


71
72
73
74
# File 'lib/oneview-sdk/resource/api200/managed_san.rb', line 71

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:


34
35
36
# File 'lib/oneview-sdk/resource/api200/managed_san.rb', line 34

def update(*)
  unavailable_method
end