Class: OvirtSDK4::OpenstackVolumeTypeService
- Inherits:
-
Service
- Object
- Service
- OvirtSDK4::OpenstackVolumeTypeService
- Defined in:
- lib/ovirtsdk4/services.rb,
lib/ovirtsdk4/services.rb
Instance Method Summary (collapse)
-
- (OpenStackVolumeType) get(opts = {})
Returns the representation of the object managed by this service.
-
- (Service) service(path)
Locates the service corresponding to the given path.
-
- (String) to_s
Returns an string representation of this service.
Instance Method Details
- (OpenStackVolumeType) get(opts = {})
Returns the representation of the object managed by this service.
14982 14983 14984 14985 14986 14987 14988 14989 14990 14991 14992 14993 14994 14995 14996 14997 |
# File 'lib/ovirtsdk4/services.rb', line 14982 def get(opts = {}) query = {} request = Request.new(:method => :GET, :path => @path, :query => query) response = @connection.send(request) case response.code when 200 begin reader = XmlReader.new(response.body) return OpenStackVolumeTypeReader.read_one(reader) ensure reader.close end else check_fault(response) end end |
- (Service) service(path)
Locates the service corresponding to the given path.
15006 15007 15008 15009 15010 15011 |
# File 'lib/ovirtsdk4/services.rb', line 15006 def service(path) if path.nil? || path == '' return self end raise Error.new("The path \"#{path}\" doesn't correspond to any service") end |
- (String) to_s
Returns an string representation of this service.
15018 15019 15020 |
# File 'lib/ovirtsdk4/services.rb', line 15018 def to_s return "#<#{OpenstackVolumeTypeService}:#{@path}>" end |