Skip to content

ManageIQ/nutanix_volumes-sdk-ruby

nutanix_volumes

NutanixVolumes - the Ruby gem for the Nutanix Volumes APIs

Configure volumes.

This SDK is automatically generated by the OpenAPI Generator project:

  • API version: 4.0
  • Package version: 1.0.0
  • Generator version: 7.9.0
  • Build package: org.openapitools.codegen.languages.RubyClientCodegen

Installation

Build a gem

To build the Ruby code into a gem:

gem build nutanix_volumes.gemspec

Then either install the gem locally:

gem install ./nutanix_volumes-1.0.0.gem

(for development, run gem install --dev ./nutanix_volumes-1.0.0.gem to install the development dependencies)

or publish the gem to a gem hosting service, e.g. RubyGems.

Finally add this to the Gemfile:

gem 'nutanix_volumes', '~> 1.0.0'

Install from Git

If the Ruby gem is hosted at a git repository: https://github.com/GIT_USER_ID/GIT_REPO_ID, then add the following in the Gemfile:

gem 'nutanix_volumes', :git => 'https://github.com/GIT_USER_ID/GIT_REPO_ID.git'

Include the Ruby code directly

Include the Ruby code directly using -I as follows:

ruby -Ilib script.rb

Getting Started

Please follow the installation procedure and then run the following code:

# Load the gem
require 'nutanix_volumes'

# Setup authorization
NutanixVolumes.configure do |config|
  # Configure API key authorization: apiKeyAuthScheme
  config.api_key['X-ntnx-api-key'] = 'YOUR API KEY'
  # Uncomment the following line to set a prefix for the API key, e.g. 'Bearer' (defaults to nil)
  # config.api_key_prefix['X-ntnx-api-key'] = 'Bearer'

  # Configure HTTP basic authorization: basicAuthScheme
  config.username = 'YOUR_USERNAME'
  config.password = 'YOUR_PASSWORD'
end

api_instance = NutanixVolumes::IscsiClientsApi.new
ext_id = 'be0e4630-23da-4b9c-a76b-f24fd64b46b6' # String | The external identifier of an iSCSI client.

begin
  #Fetch an iSCSI client details
  result = api_instance.get_iscsi_client_by_id(ext_id)
  p result
rescue NutanixVolumes::ApiError => e
  puts "Exception when calling IscsiClientsApi->get_iscsi_client_by_id: #{e}"
end

Documentation for API Endpoints

All URIs are relative to https://:9440/api

Class Method HTTP request Description
NutanixVolumes::IscsiClientsApi get_iscsi_client_by_id GET /volumes/v4.0/config/iscsi-clients/{extId} Fetch an iSCSI client details
NutanixVolumes::IscsiClientsApi list_iscsi_clients GET /volumes/v4.0/config/iscsi-clients List all the iSCSI clients
NutanixVolumes::IscsiClientsApi update_iscsi_client_by_id PUT /volumes/v4.0/config/iscsi-clients/{extId} Update an iSCSI client
NutanixVolumes::VolumeGroupsApi associate_category POST /volumes/v4.0/config/volume-groups/{extId}/$actions/associate-category Associate category to a Volume Group
NutanixVolumes::VolumeGroupsApi attach_iscsi_client POST /volumes/v4.0/config/volume-groups/{extId}/$actions/attach-iscsi-client Attach an iSCSI client to the given Volume Group
NutanixVolumes::VolumeGroupsApi attach_vm POST /volumes/v4.0/config/volume-groups/{extId}/$actions/attach-vm Attach an AHV VM to the given Volume Group
NutanixVolumes::VolumeGroupsApi create_volume_disk POST /volumes/v4.0/config/volume-groups/{volumeGroupExtId}/disks Creates a new Volume Disk
NutanixVolumes::VolumeGroupsApi create_volume_group POST /volumes/v4.0/config/volume-groups Creates a new Volume Group
NutanixVolumes::VolumeGroupsApi delete_volume_disk_by_id DELETE /volumes/v4.0/config/volume-groups/{volumeGroupExtId}/disks/{extId} Delete a Volume Disk
NutanixVolumes::VolumeGroupsApi delete_volume_group_by_id DELETE /volumes/v4.0/config/volume-groups/{extId} Delete the Volume Group
NutanixVolumes::VolumeGroupsApi detach_iscsi_client POST /volumes/v4.0/config/volume-groups/{extId}/$actions/detach-iscsi-client Detach an iSCSi client from the given Volume Group
NutanixVolumes::VolumeGroupsApi detach_vm POST /volumes/v4.0/config/volume-groups/{extId}/$actions/detach-vm Detach an AHV VM from the given Volume Group
NutanixVolumes::VolumeGroupsApi disassociate_category POST /volumes/v4.0/config/volume-groups/{extId}/$actions/disassociate-category Disassociate category from a Volume Group
NutanixVolumes::VolumeGroupsApi get_volume_disk_by_id GET /volumes/v4.0/config/volume-groups/{volumeGroupExtId}/disks/{extId} Get the details of a Volume Disk
NutanixVolumes::VolumeGroupsApi get_volume_disk_stats GET /volumes/v4.0/stats/volume-groups/{volumeGroupExtId}/disks/{extId} Get statistics for a Volume Disk
NutanixVolumes::VolumeGroupsApi get_volume_group_by_id GET /volumes/v4.0/config/volume-groups/{extId} Get a Volume Group
NutanixVolumes::VolumeGroupsApi get_volume_group_metadata_by_id GET /volumes/v4.0/config/volume-groups/{volumeGroupExtId}/metadata Fetch metadata information associated with a Volume Group.
NutanixVolumes::VolumeGroupsApi get_volume_group_stats GET /volumes/v4.0/stats/volume-groups/{extId} Get statistics for a Volume Group
NutanixVolumes::VolumeGroupsApi list_category_associations_by_volume_group_id GET /volumes/v4.0/config/volume-groups/{volumeGroupExtId}/category-associations List all the category details that are associated with the Volume Group
NutanixVolumes::VolumeGroupsApi list_external_iscsi_attachments_by_volume_group_id GET /volumes/v4.0/config/volume-groups/{volumeGroupExtId}/external-iscsi-attachments List all the iSCSI attachments associated with the given Volume Group
NutanixVolumes::VolumeGroupsApi list_vm_attachments_by_volume_group_id GET /volumes/v4.0/config/volume-groups/{volumeGroupExtId}/vm-attachments List all the VM attachments for a Volume Group
NutanixVolumes::VolumeGroupsApi list_volume_disks_by_volume_group_id GET /volumes/v4.0/config/volume-groups/{volumeGroupExtId}/disks List all the Volume Disks attached to the Volume Group
NutanixVolumes::VolumeGroupsApi list_volume_groups GET /volumes/v4.0/config/volume-groups List all the Volume Groups
NutanixVolumes::VolumeGroupsApi revert_volume_group POST /volumes/v4.0/config/volume-groups/{extId}/$actions/revert Revert a Volume Group
NutanixVolumes::VolumeGroupsApi update_volume_disk_by_id PUT /volumes/v4.0/config/volume-groups/{volumeGroupExtId}/disks/{extId} Update a specified Volume Disk
NutanixVolumes::VolumeGroupsApi update_volume_group_by_id PUT /volumes/v4.0/config/volume-groups/{extId} Update details of a specified Volume Group

Documentation for Models

Documentation for Authorization

Authentication schemes defined for the API:

basicAuthScheme

  • Type: HTTP basic authentication

apiKeyAuthScheme

  • Type: API key
  • API key parameter name: X-ntnx-api-key
  • Location: HTTP header

About

NutanixVolumes - the Ruby gem for the Nutanix Volumes APIs

Resources

License

Code of conduct

Security policy

Stars

Watchers

Forks

Packages

No packages published

Contributors 4

  •  
  •  
  •  
  •