Class: KickstartFilepreservation
- Inherits:
-
Object
- Object
- KickstartFilepreservation
- Defined in:
- lib/satops/operator.rb
Instance Attribute Summary collapse
-
#name ⇒ Object
readonly
Returns the value of attribute name.
Class Method Summary collapse
Instance Method Summary collapse
- #create(sat) ⇒ Object
- #delete(sat) ⇒ Object
-
#initialize(file_preserv) ⇒ KickstartFilepreservation
constructor
A new instance of KickstartFilepreservation.
- #update(sat) ⇒ Object
Constructor Details
#initialize(file_preserv) ⇒ KickstartFilepreservation
Returns a new instance of KickstartFilepreservation.
674 675 676 677 678 |
# File 'lib/satops/operator.rb', line 674 def initialize(file_preserv) @id=file_preserv['id'] @name=file_preserv['name'] @file_list=file_preserv['file_list'] end |
Instance Attribute Details
#name ⇒ Object (readonly)
Returns the value of attribute name.
667 668 669 |
# File 'lib/satops/operator.rb', line 667 def name @name end |
Class Method Details
.reader(sat, file_preserv) ⇒ Object
669 670 671 672 |
# File 'lib/satops/operator.rb', line 669 def self.reader(sat, file_preserv) file_preserv.merge!({'file_list'=>sat.kickstartFilepreservation.get(file_preserv['name'])['file_names']}) file_preserv end |
Instance Method Details
#create(sat) ⇒ Object
684 685 686 |
# File 'lib/satops/operator.rb', line 684 def create(sat) sat.kickstartFilepreservation.create(@name, @file_list) end |
#delete(sat) ⇒ Object
680 681 682 |
# File 'lib/satops/operator.rb', line 680 def delete(sat) sat.kickstartFilepreservation.delete(@name) end |
#update(sat) ⇒ Object
688 689 690 691 692 |
# File 'lib/satops/operator.rb', line 688 def update(sat) # No API for update self.delete(sat) self.create(sat) end |