Class: OvirtSDK4::UserService
- Defined in:
- lib/ovirtsdk4/services.rb,
lib/ovirtsdk4/services.rb
Instance Method Summary collapse
-
#get(opts = {}) ⇒ User
Gets the system user information.
-
#permissions_service ⇒ AssignedPermissionsService
Locates the
permissions
service. -
#remove(opts = {}) ⇒ Object
Removes the system user.
-
#roles_service ⇒ AssignedRolesService
Locates the
roles
service. -
#service(path) ⇒ Service
Locates the service corresponding to the given path.
-
#ssh_public_keys_service ⇒ SshPublicKeysService
Locates the
ssh_public_keys
service. -
#tags_service ⇒ AssignedTagsService
Locates the
tags
service.
Methods inherited from Service
Instance Method Details
#get(opts = {}) ⇒ User
Gets the system user information.
Usage:
GET /ovirt-engine/api/users/1234
Will return the user information:
<user href="/ovirt-engine/api/users/1234" id="1234">
<name>admin</name>
<link href="/ovirt-engine/api/users/1234/sshpublickeys" rel="sshpublickeys"/>
<link href="/ovirt-engine/api/users/1234/roles" rel="roles"/>
<link href="/ovirt-engine/api/users/1234/permissions" rel="permissions"/>
<link href="/ovirt-engine/api/users/1234/tags" rel="tags"/>
<department></department>
<domain_entry_id>23456</domain_entry_id>
<email>[email protected]</email>
<last_name>Lastname</last_name>
<namespace>*</namespace>
<principal>user1</principal>
<user_name>user1@domain-authz</user_name>
<domain href="/ovirt-engine/api/domains/45678" id="45678">
<name>domain-authz</name>
</domain>
</user>
27235 27236 27237 |
# File 'lib/ovirtsdk4/services.rb', line 27235 def get(opts = {}) internal_get(GET, opts) end |
#permissions_service ⇒ AssignedPermissionsService
Locates the permissions
service.
27275 27276 27277 |
# File 'lib/ovirtsdk4/services.rb', line 27275 def @permissions_service ||= AssignedPermissionsService.new(self, 'permissions') end |
#remove(opts = {}) ⇒ Object
Removes the system user.
Usage:
DELETE /ovirt-engine/api/users/1234
27266 27267 27268 |
# File 'lib/ovirtsdk4/services.rb', line 27266 def remove(opts = {}) internal_remove(REMOVE, opts) end |
#roles_service ⇒ AssignedRolesService
Locates the roles
service.
27284 27285 27286 |
# File 'lib/ovirtsdk4/services.rb', line 27284 def roles_service @roles_service ||= AssignedRolesService.new(self, 'roles') end |
#service(path) ⇒ Service
Locates the service corresponding to the given path.
27313 27314 27315 27316 27317 27318 27319 27320 27321 27322 27323 27324 27325 27326 27327 27328 27329 27330 27331 27332 27333 27334 27335 27336 27337 27338 27339 27340 27341 27342 |
# File 'lib/ovirtsdk4/services.rb', line 27313 def service(path) if path.nil? || path == '' return self end if path == 'permissions' return end if path.start_with?('permissions/') return .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 == 'sshpublickeys' return ssh_public_keys_service end if path.start_with?('sshpublickeys/') return ssh_public_keys_service.service(path[14..-1]) end if path == 'tags' return end if path.start_with?('tags/') return .service(path[5..-1]) end raise Error.new("The path \"#{path}\" doesn't correspond to any service") end |
#ssh_public_keys_service ⇒ SshPublicKeysService
Locates the ssh_public_keys
service.
27293 27294 27295 |
# File 'lib/ovirtsdk4/services.rb', line 27293 def ssh_public_keys_service @ssh_public_keys_service ||= SshPublicKeysService.new(self, 'sshpublickeys') end |
#tags_service ⇒ AssignedTagsService
Locates the tags
service.
27302 27303 27304 |
# File 'lib/ovirtsdk4/services.rb', line 27302 def @tags_service ||= AssignedTagsService.new(self, 'tags') end |