class Fog::OpenStack::SharedFileSystem::Real
rubocop:enable Metrics/LineLength, Metrics/MethodLength, Metrics/ClassLength, Metrics/AbcSize
Public Class Methods
new(options = {})
click to toggle source
Calls superclass method
Fog::OpenStack::Core::new
# File lib/fog/openstack/shared_file_system.rb, line 362 def initialize(options = {}) @supported_versions = SUPPORTED_VERSIONS @supported_microversion = SUPPORTED_MICROVERSION @fixed_microversion = options[:openstack_shared_file_system_microversion] @microversion_key = 'X-Openstack-Manila-Api-Version'.freeze super end
not_found_class()
click to toggle source
# File lib/fog/openstack/shared_file_system.rb, line 350 def self.not_found_class Fog::OpenStack::SharedFileSystem::NotFound end
Public Instance Methods
action_prefix()
click to toggle source
# File lib/fog/openstack/shared_file_system.rb, line 354 def action_prefix microversion_newer_than?('2.6') ? '' : 'os-' end
create_security_service(type, name, options = {})
click to toggle source
# File lib/fog/openstack/shared_file_system/requests/create_security_service.rb, line 5 def create_security_service(type, name, options = {}) data = { 'type' => type, 'name' => name } vanilla_options = [ :description, :dns_ip, :user, :password, :domain, :server ] vanilla_options.select { |o| options[o] }.each do |key| data[key] = options[key] end request( :body => Fog::JSON.encode('security_service' => data), :expects => 200, :method => 'POST', :path => 'security-services' ) end
create_snapshot(share_id, options = {})
click to toggle source
# File lib/fog/openstack/shared_file_system/requests/create_snapshot.rb, line 5 def create_snapshot(share_id, options = {}) data = { 'share_id' => share_id } vanilla_options = [ :name, :description, :display_name, :display_description, :force ] vanilla_options.select { |o| options[o] }.each do |key| data[key] = options[key] end request( :body => Fog::JSON.encode('snapshot' => data), :expects => 202, :method => 'POST', :path => 'snapshots' ) end
default_service_type()
click to toggle source
# File lib/fog/openstack/shared_file_system.rb, line 358 def default_service_type %w[sharev2] end
delete_security_service(id)
click to toggle source
# File lib/fog/openstack/shared_file_system/requests/delete_security_service.rb, line 5 def delete_security_service(id) request( :expects => 202, :method => 'DELETE', :path => "security-services/#{id}" ) end
delete_snapshot(id)
click to toggle source
# File lib/fog/openstack/shared_file_system/requests/delete_snapshot.rb, line 5 def delete_snapshot(id) request( :expects => 202, :method => 'DELETE', :path => "snapshots/#{id}" ) end
get_limits()
click to toggle source
# File lib/fog/openstack/shared_file_system/requests/get_limits.rb, line 5 def get_limits request( :expects => 200, :method => 'GET', :path => 'limits' ) end
get_quota(project_id)
click to toggle source
# File lib/fog/openstack/shared_file_system/requests/get_quota.rb, line 5 def get_quota(project_id) request( :expects => 200, :method => 'GET', :path => "#{action_prefix}quota-sets/#{project_id}" ) end
get_security_service(id)
click to toggle source
# File lib/fog/openstack/shared_file_system/requests/get_security_service.rb, line 5 def get_security_service(id) request( :expects => 200, :method => 'GET', :path => "security-services/#{id}" ) end
get_snapshot(id)
click to toggle source
# File lib/fog/openstack/shared_file_system/requests/get_snapshot.rb, line 5 def get_snapshot(id) request( :expects => 200, :method => 'GET', :path => "snapshots/#{id}" ) end
list_availability_zones()
click to toggle source
# File lib/fog/openstack/shared_file_system/requests/list_availability_zones.rb, line 5 def list_availability_zones() request( :expects => 200, :method => 'GET', :path => microversion_newer_than?('2.6') ? 'availability-zones' : 'os-availability-zone' ) end
list_security_services(options = {})
click to toggle source
# File lib/fog/openstack/shared_file_system/requests/list_security_services.rb, line 5 def list_security_services(options = {}) request( :expects => 200, :method => 'GET', :path => 'security-services', :query => options ) end
list_security_services_detail(options = {})
click to toggle source
# File lib/fog/openstack/shared_file_system/requests/list_security_services_detail.rb, line 5 def list_security_services_detail(options = {}) request( :expects => 200, :method => 'GET', :path => 'security-services/detail', :query => options ) end
list_snapshots(options = {})
click to toggle source
# File lib/fog/openstack/shared_file_system/requests/list_snapshots.rb, line 5 def list_snapshots(options = {}) request( :expects => 200, :method => 'GET', :path => 'snapshots', :query => options ) end
list_snapshots_detail(options = {})
click to toggle source
# File lib/fog/openstack/shared_file_system/requests/list_snapshots_detail.rb, line 5 def list_snapshots_detail(options = {}) request( :expects => 200, :method => 'GET', :path => 'snapshots/detail', :query => options ) end
update_quota(project_id, options = {})
click to toggle source
# File lib/fog/openstack/shared_file_system/requests/update_quota.rb, line 5 def update_quota(project_id, options = {}) request( :body => Fog::JSON.encode('quota_set' => options), :expects => 200, :method => 'PUT', :path => "#{action_prefix}quota-sets/#{project_id}" ) end
update_security_service(id, options = {})
click to toggle source
# File lib/fog/openstack/shared_file_system/requests/update_security_service.rb, line 5 def update_security_service(id, options = {}) request( :body => Fog::JSON.encode('security_service' => options), :expects => 200, :method => 'PUT', :path => "security-services/#{id}" ) end
update_snapshot(id, options = {})
click to toggle source
# File lib/fog/openstack/shared_file_system/requests/update_snapshot.rb, line 5 def update_snapshot(id, options = {}) request( :body => Fog::JSON.encode('snapshot' => options), :expects => 200, :method => 'PUT', :path => "snapshots/#{id}" ) end