class OneviewSDK::API200::Switch
Switch
resource implementation
Constants
- BASE_URI
- TYPE_URI
- UNIQUE_IDENTIFIERS
Public Class Methods
Retrieves the switch type with the name @param [OneviewSDK::Client] client The client object for the OneView appliance @param [String] name Switch
type name @return [Array] Switch
type
# File lib/oneview-sdk/resource/api200/switch.rb, line 63 def self.get_type(client, name) results = get_types(client) results.find { |switch_type| switch_type['name'] == name } end
Retrieves the switch types @param [OneviewSDK::Client] client The client object for the OneView appliance @return [Array] All the Switch
types
# File lib/oneview-sdk/resource/api200/switch.rb, line 53 def self.get_types(client) response = client.rest_get(TYPE_URI) response = client.response_handler(response) response['members'] end
Public Instance Methods
Method is not available @raise [OneviewSDK::MethodUnavailable] method is not available
# File lib/oneview-sdk/resource/api200/switch.rb, line 28 def create(*) unavailable_method end
Method is not available @raise [OneviewSDK::MethodUnavailable] method is not available
# File lib/oneview-sdk/resource/api200/switch.rb, line 46 def delete(*) unavailable_method end
Get settings that describe the environmental configuration @return [Hash] Configuration parameters
# File lib/oneview-sdk/resource/api200/switch.rb, line 78 def environmental_configuration ensure_client && ensure_uri response = @client.rest_get(@data['uri'] + '/environmentalConfiguration', {}, @api_version) @client.response_handler(response) end
Method is not available @raise [OneviewSDK::MethodUnavailable] method is not available
# File lib/oneview-sdk/resource/api200/switch.rb, line 40 def refresh(*) unavailable_method end
Remove resource from OneView @return [true] if resource was removed successfully
Get statistics for a switch or for the specified port. @param [String] port_name port to retrieve statistics @return [Hash] Switch
statistics
# File lib/oneview-sdk/resource/api200/switch.rb, line 71 def statistics(port_name = nil) response = @client.rest_get("#{@data['uri']}/statistics/#{port_name}") response.body end
Method is not available @raise [OneviewSDK::MethodUnavailable] method is not available
# File lib/oneview-sdk/resource/api200/switch.rb, line 34 def update(*) unavailable_method end