Class: OvirtSDK4::SystemService

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

#affinity_labels_serviceAffinityLabelsService

List all known affinity labels.

Returns:


25304
25305
25306
# File 'lib/ovirtsdk4/services.rb', line 25304

def affinity_labels_service
  @affinity_labels_service ||= AffinityLabelsService.new(self, 'affinitylabels')
end

#bookmarks_serviceBookmarksService

Locates the bookmarks service.

Returns:


25313
25314
25315
# File 'lib/ovirtsdk4/services.rb', line 25313

def bookmarks_service
  @bookmarks_service ||= BookmarksService.new(self, 'bookmarks')
end

#cluster_levels_serviceClusterLevelsService

Reference to the service that provides information about the cluster levels supported by the system.

Returns:


25322
25323
25324
# File 'lib/ovirtsdk4/services.rb', line 25322

def cluster_levels_service
  @cluster_levels_service ||= ClusterLevelsService.new(self, 'clusterlevels')
end

#clusters_serviceClustersService

Locates the clusters service.

Returns:


25331
25332
25333
# File 'lib/ovirtsdk4/services.rb', line 25331

def clusters_service
  @clusters_service ||= ClustersService.new(self, 'clusters')
end

#cpu_profiles_serviceCpuProfilesService

Locates the cpu_profiles service.

Returns:


25340
25341
25342
# File 'lib/ovirtsdk4/services.rb', line 25340

def cpu_profiles_service
  @cpu_profiles_service ||= CpuProfilesService.new(self, 'cpuprofiles')
end

#data_centers_serviceDataCentersService

Locates the data_centers service.

Returns:


25349
25350
25351
# File 'lib/ovirtsdk4/services.rb', line 25349

def data_centers_service
  @data_centers_service ||= DataCentersService.new(self, 'datacenters')
end

#disk_profiles_serviceDiskProfilesService

Locates the disk_profiles service.

Returns:


25358
25359
25360
# File 'lib/ovirtsdk4/services.rb', line 25358

def disk_profiles_service
  @disk_profiles_service ||= DiskProfilesService.new(self, 'diskprofiles')
end

#disks_serviceDisksService

Locates the disks service.

Returns:


25367
25368
25369
# File 'lib/ovirtsdk4/services.rb', line 25367

def disks_service
  @disks_service ||= DisksService.new(self, 'disks')
end

#domains_serviceDomainsService

Locates the domains service.

Returns:


25376
25377
25378
# File 'lib/ovirtsdk4/services.rb', line 25376

def domains_service
  @domains_service ||= DomainsService.new(self, 'domains')
end

#events_serviceEventsService

Locates the events service.

Returns:


25385
25386
25387
# File 'lib/ovirtsdk4/services.rb', line 25385

def events_service
  @events_service ||= EventsService.new(self, 'events')
end

#external_host_providers_serviceExternalHostProvidersService

Locates the external_host_providers service.

Returns:


25394
25395
25396
# File 'lib/ovirtsdk4/services.rb', line 25394

def external_host_providers_service
  @external_host_providers_service ||= ExternalHostProvidersService.new(self, 'externalhostproviders')
end

#external_vm_imports_serviceExternalVmImportsService

Reference to service facilitating import of external virtual machines.

Returns:


25403
25404
25405
# File 'lib/ovirtsdk4/services.rb', line 25403

def external_vm_imports_service
  @external_vm_imports_service ||= ExternalVmImportsService.new(self, 'externalvmimports')
end

#get(opts = {}) ⇒ Api

Returns basic information describing the API, like the product name, the version number and a summary of the number of relevant objects.

GET /ovirt-engine/api

We get following response:

<api>
  <link rel="capabilities" href="/api/capabilities"/>
  <link rel="clusters" href="/api/clusters"/>
  <link rel="clusters/search" href="/api/clusters?search={query}"/>
  <link rel="datacenters" href="/api/datacenters"/>
  <link rel="datacenters/search" href="/api/datacenters?search={query}"/>
  <link rel="events" href="/api/events"/>
  <link rel="events/search" href="/api/events?search={query}"/>
  <link rel="hosts" href="/api/hosts"/>
  <link rel="hosts/search" href="/api/hosts?search={query}"/>
  <link rel="networks" href="/api/networks"/>
  <link rel="roles" href="/api/roles"/>
  <link rel="storagedomains" href="/api/storagedomains"/>
  <link rel="storagedomains/search" href="/api/storagedomains?search={query}"/>
  <link rel="tags" href="/api/tags"/>
  <link rel="templates" href="/api/templates"/>
  <link rel="templates/search" href="/api/templates?search={query}"/>
  <link rel="users" href="/api/users"/>
  <link rel="groups" href="/api/groups"/>
  <link rel="domains" href="/api/domains"/>
  <link rel="vmpools" href="/api/vmpools"/>
  <link rel="vmpools/search" href="/api/vmpools?search={query}"/>
  <link rel="vms" href="/api/vms"/>
  <link rel="vms/search" href="/api/vms?search={query}"/>
  <product_info>
    <name>oVirt Engine</name>
    <vendor>ovirt.org</vendor>
    <version>
      <build>4</build>
      <full_version>4.0.4</full_version>
      <major>4</major>
      <minor>0</minor>
      <revision>0</revision>
    </version>
  </product_info>
  <special_objects>
    <blank_template href="/ovirt-engine/api/templates/00000000-0000-0000-0000-000000000000" id="00000000-0000-0000-0000-000000000000"/>
    <root_tag href="/ovirt-engine/api/tags/00000000-0000-0000-0000-000000000000" id="00000000-0000-0000-0000-000000000000"/>
  </special_objects>
  <summary>
    <hosts>
      <active>0</active>
      <total>0</total>
    </hosts>
    <storage_domains>
      <active>0</active>
      <total>1</total>
    </storage_domains>
    <users>
      <active>1</active>
      <total>1</total>
    </users>
    <vms>
      <active>0</active>
      <total>0</total>
    </vms>
  </summary>
  <time>2016-09-14T12:00:48.132+02:00</time>
</api>

The entry point provides a user with links to the collections in a virtualization environment. The rel attribute of each collection link provides a reference point for each link.

The entry point also contains other data such as product_info, special_objects and summary.

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:


25269
25270
25271
# File 'lib/ovirtsdk4/services.rb', line 25269

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

#groups_serviceGroupsService

Locates the groups service.

Returns:


25412
25413
25414
# File 'lib/ovirtsdk4/services.rb', line 25412

def groups_service
  @groups_service ||= GroupsService.new(self, 'groups')
end

#hosts_serviceHostsService

Locates the hosts service.

Returns:


25421
25422
25423
# File 'lib/ovirtsdk4/services.rb', line 25421

def hosts_service
  @hosts_service ||= HostsService.new(self, 'hosts')
end

#icons_serviceIconsService

Locates the icons service.

Returns:


25430
25431
25432
# File 'lib/ovirtsdk4/services.rb', line 25430

def icons_service
  @icons_service ||= IconsService.new(self, 'icons')
end

#image_transfers_serviceImageTransfersService

List of all image transfers being performed for image I/O in oVirt.

Returns:


25439
25440
25441
# File 'lib/ovirtsdk4/services.rb', line 25439

def image_transfers_service
  @image_transfers_service ||= ImageTransfersService.new(self, 'imagetransfers')
end

#instance_types_serviceInstanceTypesService

Locates the instance_types service.

Returns:


25448
25449
25450
# File 'lib/ovirtsdk4/services.rb', line 25448

def instance_types_service
  @instance_types_service ||= InstanceTypesService.new(self, 'instancetypes')
end

#jobs_serviceJobsService

List all the jobs monitored by the engine.

Returns:


25457
25458
25459
# File 'lib/ovirtsdk4/services.rb', line 25457

def jobs_service
  @jobs_service ||= JobsService.new(self, 'jobs')
end

#katello_errata_serviceEngineKatelloErrataService

List the available Katello errata assigned to the engine.

Returns:


25466
25467
25468
# File 'lib/ovirtsdk4/services.rb', line 25466

def katello_errata_service
  @katello_errata_service ||= EngineKatelloErrataService.new(self, 'katelloerrata')
end

#mac_pools_serviceMacPoolsService

Locates the mac_pools service.

Returns:


25475
25476
25477
# File 'lib/ovirtsdk4/services.rb', line 25475

def mac_pools_service
  @mac_pools_service ||= MacPoolsService.new(self, 'macpools')
end

#network_filters_serviceNetworkFiltersService

Network filters will enhance the admin ability to manage the network packets traffic from/to the participated VMs.

Returns:


25485
25486
25487
# File 'lib/ovirtsdk4/services.rb', line 25485

def network_filters_service
  @network_filters_service ||= NetworkFiltersService.new(self, 'networkfilters')
end

#networks_serviceNetworksService

Locates the networks service.

Returns:


25494
25495
25496
# File 'lib/ovirtsdk4/services.rb', line 25494

def networks_service
  @networks_service ||= NetworksService.new(self, 'networks')
end

#openstack_image_providers_serviceOpenstackImageProvidersService

Locates the openstack_image_providers service.

Returns:


25503
25504
25505
# File 'lib/ovirtsdk4/services.rb', line 25503

def openstack_image_providers_service
  @openstack_image_providers_service ||= OpenstackImageProvidersService.new(self, 'openstackimageproviders')
end

#openstack_network_providers_serviceOpenstackNetworkProvidersService

Locates the openstack_network_providers service.

Returns:


25512
25513
25514
# File 'lib/ovirtsdk4/services.rb', line 25512

def openstack_network_providers_service
  @openstack_network_providers_service ||= OpenstackNetworkProvidersService.new(self, 'openstacknetworkproviders')
end

#openstack_volume_providers_serviceOpenstackVolumeProvidersService

Locates the openstack_volume_providers service.

Returns:


25521
25522
25523
# File 'lib/ovirtsdk4/services.rb', line 25521

def openstack_volume_providers_service
  @openstack_volume_providers_service ||= OpenstackVolumeProvidersService.new(self, 'openstackvolumeproviders')
end

#operating_systems_serviceOperatingSystemsService

Locates the operating_systems service.

Returns:


25530
25531
25532
# File 'lib/ovirtsdk4/services.rb', line 25530

def operating_systems_service
  @operating_systems_service ||= OperatingSystemsService.new(self, 'operatingsystems')
end

#options_serviceSystemOptionsService

Reference to the service that provides values of configuration options of the system.

Returns:


25539
25540
25541
# File 'lib/ovirtsdk4/services.rb', line 25539

def options_service
  @options_service ||= SystemOptionsService.new(self, 'options')
end

#permissions_serviceSystemPermissionsService

Locates the permissions service.

Returns:


25548
25549
25550
# File 'lib/ovirtsdk4/services.rb', line 25548

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

#reload_configurations(opts = {}) ⇒ Object

Executes the reload_configurations method.

Parameters:

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

    Additional options.

Options Hash (opts):

  • :async (Boolean)

    Indicates if the reload 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.


25295
25296
25297
# File 'lib/ovirtsdk4/services.rb', line 25295

def reload_configurations(opts = {})
  internal_action(:reloadconfigurations, nil, RELOAD_CONFIGURATIONS, opts)
end

#roles_serviceRolesService

Locates the roles service.

Returns:


25557
25558
25559
# File 'lib/ovirtsdk4/services.rb', line 25557

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

#scheduling_policies_serviceSchedulingPoliciesService

Locates the scheduling_policies service.

Returns:


25566
25567
25568
# File 'lib/ovirtsdk4/services.rb', line 25566

def scheduling_policies_service
  @scheduling_policies_service ||= SchedulingPoliciesService.new(self, 'schedulingpolicies')
end

#scheduling_policy_units_serviceSchedulingPolicyUnitsService

Locates the scheduling_policy_units service.

Returns:


25575
25576
25577
# File 'lib/ovirtsdk4/services.rb', line 25575

def scheduling_policy_units_service
  @scheduling_policy_units_service ||= SchedulingPolicyUnitsService.new(self, 'schedulingpolicyunits')
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:


25658
25659
25660
25661
25662
25663
25664
25665
25666
25667
25668
25669
25670
25671
25672
25673
25674
25675
25676
25677
25678
25679
25680
25681
25682
25683
25684
25685
25686
25687
25688
25689
25690
25691
25692
25693
25694
25695
25696
25697
25698
25699
25700
25701
25702
25703
25704
25705
25706
25707
25708
25709
25710
25711
25712
25713
25714
25715
25716
25717
25718
25719
25720
25721
25722
25723
25724
25725
25726
25727
25728
25729
25730
25731
25732
25733
25734
25735
25736
25737
25738
25739
25740
25741
25742
25743
25744
25745
25746
25747
25748
25749
25750
25751
25752
25753
25754
25755
25756
25757
25758
25759
25760
25761
25762
25763
25764
25765
25766
25767
25768
25769
25770
25771
25772
25773
25774
25775
25776
25777
25778
25779
25780
25781
25782
25783
25784
25785
25786
25787
25788
25789
25790
25791
25792
25793
25794
25795
25796
25797
25798
25799
25800
25801
25802
25803
25804
25805
25806
25807
25808
25809
25810
25811
25812
25813
25814
25815
25816
25817
25818
25819
25820
25821
25822
25823
25824
25825
25826
25827
25828
25829
25830
25831
25832
25833
25834
25835
25836
25837
25838
25839
25840
25841
25842
25843
25844
25845
25846
25847
25848
25849
25850
25851
25852
25853
25854
25855
25856
25857
25858
25859
25860
25861
25862
25863
25864
25865
25866
25867
25868
25869
25870
25871
25872
25873
25874
25875
25876
25877
25878
25879
25880
25881
25882
25883
25884
25885
25886
25887
25888
25889
25890
25891
25892
25893
25894
25895
25896
25897
# File 'lib/ovirtsdk4/services.rb', line 25658

def service(path)
  if path.nil? || path == ''
    return self
  end
  if path == 'affinitylabels'
    return affinity_labels_service
  end
  if path.start_with?('affinitylabels/')
    return affinity_labels_service.service(path[15..-1])
  end
  if path == 'bookmarks'
    return bookmarks_service
  end
  if path.start_with?('bookmarks/')
    return bookmarks_service.service(path[10..-1])
  end
  if path == 'clusterlevels'
    return cluster_levels_service
  end
  if path.start_with?('clusterlevels/')
    return cluster_levels_service.service(path[14..-1])
  end
  if path == 'clusters'
    return clusters_service
  end
  if path.start_with?('clusters/')
    return clusters_service.service(path[9..-1])
  end
  if path == 'cpuprofiles'
    return cpu_profiles_service
  end
  if path.start_with?('cpuprofiles/')
    return cpu_profiles_service.service(path[12..-1])
  end
  if path == 'datacenters'
    return data_centers_service
  end
  if path.start_with?('datacenters/')
    return data_centers_service.service(path[12..-1])
  end
  if path == 'diskprofiles'
    return disk_profiles_service
  end
  if path.start_with?('diskprofiles/')
    return disk_profiles_service.service(path[13..-1])
  end
  if path == 'disks'
    return disks_service
  end
  if path.start_with?('disks/')
    return disks_service.service(path[6..-1])
  end
  if path == 'domains'
    return domains_service
  end
  if path.start_with?('domains/')
    return domains_service.service(path[8..-1])
  end
  if path == 'events'
    return events_service
  end
  if path.start_with?('events/')
    return events_service.service(path[7..-1])
  end
  if path == 'externalhostproviders'
    return external_host_providers_service
  end
  if path.start_with?('externalhostproviders/')
    return external_host_providers_service.service(path[22..-1])
  end
  if path == 'externalvmimports'
    return external_vm_imports_service
  end
  if path.start_with?('externalvmimports/')
    return external_vm_imports_service.service(path[18..-1])
  end
  if path == 'groups'
    return groups_service
  end
  if path.start_with?('groups/')
    return groups_service.service(path[7..-1])
  end
  if path == 'hosts'
    return hosts_service
  end
  if path.start_with?('hosts/')
    return hosts_service.service(path[6..-1])
  end
  if path == 'icons'
    return icons_service
  end
  if path.start_with?('icons/')
    return icons_service.service(path[6..-1])
  end
  if path == 'imagetransfers'
    return image_transfers_service
  end
  if path.start_with?('imagetransfers/')
    return image_transfers_service.service(path[15..-1])
  end
  if path == 'instancetypes'
    return instance_types_service
  end
  if path.start_with?('instancetypes/')
    return instance_types_service.service(path[14..-1])
  end
  if path == 'jobs'
    return jobs_service
  end
  if path.start_with?('jobs/')
    return jobs_service.service(path[5..-1])
  end
  if path == 'katelloerrata'
    return katello_errata_service
  end
  if path.start_with?('katelloerrata/')
    return katello_errata_service.service(path[14..-1])
  end
  if path == 'macpools'
    return mac_pools_service
  end
  if path.start_with?('macpools/')
    return mac_pools_service.service(path[9..-1])
  end
  if path == 'networkfilters'
    return network_filters_service
  end
  if path.start_with?('networkfilters/')
    return network_filters_service.service(path[15..-1])
  end
  if path == 'networks'
    return networks_service
  end
  if path.start_with?('networks/')
    return networks_service.service(path[9..-1])
  end
  if path == 'openstackimageproviders'
    return openstack_image_providers_service
  end
  if path.start_with?('openstackimageproviders/')
    return openstack_image_providers_service.service(path[24..-1])
  end
  if path == 'openstacknetworkproviders'
    return openstack_network_providers_service
  end
  if path.start_with?('openstacknetworkproviders/')
    return openstack_network_providers_service.service(path[26..-1])
  end
  if path == 'openstackvolumeproviders'
    return openstack_volume_providers_service
  end
  if path.start_with?('openstackvolumeproviders/')
    return openstack_volume_providers_service.service(path[25..-1])
  end
  if path == 'operatingsystems'
    return operating_systems_service
  end
  if path.start_with?('operatingsystems/')
    return operating_systems_service.service(path[17..-1])
  end
  if path == 'options'
    return options_service
  end
  if path.start_with?('options/')
    return options_service.service(path[8..-1])
  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 == 'schedulingpolicies'
    return scheduling_policies_service
  end
  if path.start_with?('schedulingpolicies/')
    return scheduling_policies_service.service(path[19..-1])
  end
  if path == 'schedulingpolicyunits'
    return scheduling_policy_units_service
  end
  if path.start_with?('schedulingpolicyunits/')
    return scheduling_policy_units_service.service(path[22..-1])
  end
  if path == 'storageconnections'
    return storage_connections_service
  end
  if path.start_with?('storageconnections/')
    return storage_connections_service.service(path[19..-1])
  end
  if path == 'storagedomains'
    return storage_domains_service
  end
  if path.start_with?('storagedomains/')
    return storage_domains_service.service(path[15..-1])
  end
  if path == 'tags'
    return tags_service
  end
  if path.start_with?('tags/')
    return tags_service.service(path[5..-1])
  end
  if path == 'templates'
    return templates_service
  end
  if path.start_with?('templates/')
    return templates_service.service(path[10..-1])
  end
  if path == 'users'
    return users_service
  end
  if path.start_with?('users/')
    return users_service.service(path[6..-1])
  end
  if path == 'vmpools'
    return vm_pools_service
  end
  if path.start_with?('vmpools/')
    return vm_pools_service.service(path[8..-1])
  end
  if path == 'vms'
    return vms_service
  end
  if path.start_with?('vms/')
    return vms_service.service(path[4..-1])
  end
  if path == 'vnicprofiles'
    return vnic_profiles_service
  end
  if path.start_with?('vnicprofiles/')
    return vnic_profiles_service.service(path[13..-1])
  end
  raise Error.new("The path \"#{path}\" doesn't correspond to any service")
end

#storage_connections_serviceStorageServerConnectionsService

Locates the storage_connections service.

Returns:


25584
25585
25586
# File 'lib/ovirtsdk4/services.rb', line 25584

def storage_connections_service
  @storage_connections_service ||= StorageServerConnectionsService.new(self, 'storageconnections')
end

#storage_domains_serviceStorageDomainsService

Locates the storage_domains service.

Returns:


25593
25594
25595
# File 'lib/ovirtsdk4/services.rb', line 25593

def storage_domains_service
  @storage_domains_service ||= StorageDomainsService.new(self, 'storagedomains')
end

#tags_serviceTagsService

Locates the tags service.

Returns:


25602
25603
25604
# File 'lib/ovirtsdk4/services.rb', line 25602

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

#templates_serviceTemplatesService

Locates the templates service.

Returns:


25611
25612
25613
# File 'lib/ovirtsdk4/services.rb', line 25611

def templates_service
  @templates_service ||= TemplatesService.new(self, 'templates')
end

#users_serviceUsersService

Locates the users service.

Returns:


25620
25621
25622
# File 'lib/ovirtsdk4/services.rb', line 25620

def users_service
  @users_service ||= UsersService.new(self, 'users')
end

#vm_pools_serviceVmPoolsService

Locates the vm_pools service.

Returns:


25629
25630
25631
# File 'lib/ovirtsdk4/services.rb', line 25629

def vm_pools_service
  @vm_pools_service ||= VmPoolsService.new(self, 'vmpools')
end

#vms_serviceVmsService

Locates the vms service.

Returns:


25638
25639
25640
# File 'lib/ovirtsdk4/services.rb', line 25638

def vms_service
  @vms_service ||= VmsService.new(self, 'vms')
end

#vnic_profiles_serviceVnicProfilesService

Locates the vnic_profiles service.

Returns:


25647
25648
25649
# File 'lib/ovirtsdk4/services.rb', line 25647

def vnic_profiles_service
  @vnic_profiles_service ||= VnicProfilesService.new(self, 'vnicprofiles')
end