Class: OvirtSDK4::GroupService

Inherits:
Service
  • Object
show all
Defined in:
lib/ovirtsdk4/services.rb,
lib/ovirtsdk4/services.rb

Instance Method Summary collapse

Methods inherited from Service

#inspect, #to_s

Instance Method Details

#get(opts = {}) ⇒ Group

Gets the system group information.

Usage:

GET /ovirt-engine/api/groups/123

Will return the group information:

<group href="/ovirt-engine/api/groups/123" id="123">
  <name>mygroup</name>
  <link href="/ovirt-engine/api/groups/123/roles" rel="roles"/>
  <link href="/ovirt-engine/api/groups/123/permissions" rel="permissions"/>
  <link href="/ovirt-engine/api/groups/123/tags" rel="tags"/>
  <domain_entry_id>476652557A382F67696B6D2B32762B37796E46476D513D3D</domain_entry_id>
  <namespace>DC=example,DC=com</namespace>
  <domain href="/ovirt-engine/api/domains/ABCDEF" id="ABCDEF">
    <name>myextension-authz</name>
  </domain>
</group>

Parameters:

  • opts (Hash) (defaults to: {})

    Additional options.

Options Hash (opts):

  • :follow (String)

    Indicates which inner links should be followed. The objects referenced by these links will be fetched as part of the current request. See here for details.

  • :headers (Hash) — default: {}

    Additional HTTP headers.

  • :query (Hash) — default: {}

    Additional URL query parameters.

  • :timeout (Integer) — default: nil

    The timeout for this request, in seconds. If no value is explicitly given then the timeout set globally for the connection will be used.

  • :wait (Boolean) — default: true

    If true wait for the response.

Returns:



11842
11843
11844
# File 'lib/ovirtsdk4/services.rb', line 11842

def get(opts = {})
  internal_get(GET, opts)
end

#permissions_serviceAssignedPermissionsService

Reference to the service that manages the collection of permissions assigned to this system group.

Returns:



11882
11883
11884
# File 'lib/ovirtsdk4/services.rb', line 11882

def permissions_service
  @permissions_service ||= AssignedPermissionsService.new(self, 'permissions')
end

#remove(opts = {}) ⇒ Object

Removes the system group.

Usage:

DELETE /ovirt-engine/api/groups/123

Parameters:

  • opts (Hash) (defaults to: {})

    Additional options.

Options Hash (opts):

  • :async (Boolean)

    Indicates if the remove should be performed asynchronously.

  • :headers (Hash) — default: {}

    Additional HTTP headers.

  • :query (Hash) — default: {}

    Additional URL query parameters.

  • :timeout (Integer) — default: nil

    The timeout for this request, in seconds. If no value is explicitly given then the timeout set globally for the connection will be used.

  • :wait (Boolean) — default: true

    If true wait for the response.



11873
11874
11875
# File 'lib/ovirtsdk4/services.rb', line 11873

def remove(opts = {})
  internal_remove(REMOVE, opts)
end

#roles_serviceAssignedRolesService

Reference to the service that manages the collection of roles assigned to this system group.

Returns:



11891
11892
11893
# File 'lib/ovirtsdk4/services.rb', line 11891

def roles_service
  @roles_service ||= AssignedRolesService.new(self, 'roles')
end

#service(path) ⇒ Service

Locates the service corresponding to the given path.

Parameters:

  • path (String)

    The path of the service.

Returns:

  • (Service)

    A reference to the service.

Raises:



11911
11912
11913
11914
11915
11916
11917
11918
11919
11920
11921
11922
11923
11924
11925
11926
11927
11928
11929
11930
11931
11932
11933
11934
# File 'lib/ovirtsdk4/services.rb', line 11911

def service(path)
  if path.nil? || path == ''
    return self
  end
  if path == 'permissions'
    return permissions_service
  end
  if path.start_with?('permissions/')
    return permissions_service.service(path[12..-1])
  end
  if path == 'roles'
    return roles_service
  end
  if path.start_with?('roles/')
    return roles_service.service(path[6..-1])
  end
  if path == 'tags'
    return tags_service
  end
  if path.start_with?('tags/')
    return tags_service.service(path[5..-1])
  end
  raise Error.new("The path \"#{path}\" doesn't correspond to any service")
end

#tags_serviceAssignedTagsService

Reference to the service that manages the collection of tags assigned to this system group.

Returns:



11900
11901
11902
# File 'lib/ovirtsdk4/services.rb', line 11900

def tags_service
  @tags_service ||= AssignedTagsService.new(self, 'tags')
end