Class: RHN::KickstartFilepreservation

Inherits:
Operation
  • Object
show all
Defined in:
lib/satops/rhsat.rb

Instance Method Summary collapse

Methods inherited from Operation

#action, #action_list, #define, #trace_info, #trace_warn

Constructor Details

#initialize(sat) ⇒ KickstartFilepreservation

Returns a new instance of KickstartFilepreservation.



310
311
312
313
314
315
316
# File 'lib/satops/rhsat.rb', line 310

def initialize(sat)
  super(sat)
  define 'kickstart.filepreservation.create'
  define 'kickstart.filepreservation.delete'
  define 'kickstart.filepreservation.getDetails'
  define 'kickstart.filepreservation.listAllFilePreservations', :list
end

Instance Method Details

#exist?(name) ⇒ Boolean

Returns:

  • (Boolean)


318
319
320
321
322
323
324
# File 'lib/satops/rhsat.rb', line 318

def exist?(name)
  if get(name)
    return true
  else
    return false
  end
end

#get(name) ⇒ Object



326
327
328
329
330
# File 'lib/satops/rhsat.rb', line 326

def get(name)
  action('kickstart.filepreservation.getDetails', name)
rescue RuntimeError # Workaround for bug 'cause empty
  return nil
end