Class: ActivationkeysSet
- Inherits:
-
OperationSet
- Object
- OperationSet
- ActivationkeysSet
- Defined in:
- lib/satops/operator.rb
Instance Attribute Summary
Attributes inherited from OperationSet
Class Method Summary collapse
-
.get_server_groups_ids(sat, names) ⇒ Object
Grab server group IDs using names.
-
.get_server_groups_names(sat, ids) ⇒ Object
Grab server group names using IDs.
Instance Method Summary collapse
Methods inherited from OperationSet
#-, #delete_all, #extra, #fetch, #initialize
Constructor Details
This class inherits a constructor from OperationSet
Class Method Details
.get_server_groups_ids(sat, names) ⇒ Object
Grab server group IDs using names
315 316 317 318 319 320 321 |
# File 'lib/satops/operator.rb', line 315 def self.get_server_groups_ids(sat, names) server_group_ids=[] names.each do |e| server_group_ids << sat.systemgroup.getDetails(e)['id'] end server_group_ids end |
.get_server_groups_names(sat, ids) ⇒ Object
Grab server group names using IDs
324 325 326 327 328 329 330 331 |
# File 'lib/satops/operator.rb', line 324 def self.get_server_groups_names(sat, ids) server_group_names=Array.new ids.each do |e| server_group=sat.systemgroup.getDetails(e) server_group_names << server_group['name'] end server_group_names end |
Instance Method Details
#fetch_all ⇒ Object
333 334 335 336 337 338 339 |
# File 'lib/satops/operator.rb', line 333 def fetch_all activation_keys=[] @sat.activationkey.list.each do |activation_key| activation_keys << Activationkey.new(Activationkey.reader(@sat, activation_key['key'])) end activation_keys end |
#include?(arg) ⇒ Boolean
341 342 343 |
# File 'lib/satops/operator.rb', line 341 def include?(arg) self.include_key?(arg) end |