Class: Staypuft::Deployment::CephService

Inherits:
AbstractParamScope show all
Defined in:
app/models/staypuft/deployment/ceph_service.rb

Defined Under Namespace

Classes: Jail

Instance Attribute Summary

Attributes inherited from AbstractParamScope

#deployment

Class Method Summary collapse

Instance Method Summary collapse

Methods inherited from AbstractParamScope

#attributes=, #hostgroup, #initialize, #marked_for_destruction?

Methods included from AttributeParamStorage

#param_attr, #param_attr_array, #param_scope

Constructor Details

This class inherits a constructor from Staypuft::Deployment::AbstractParamScope

Class Method Details

.param_scopeObject



3
4
5
# File 'app/models/staypuft/deployment/ceph_service.rb', line 3

def self.param_scope
  'ceph'
end

Instance Method Details

#mon_initial_membersObject



27
28
29
# File 'app/models/staypuft/deployment/ceph_service.rb', line 27

def mon_initial_members
  deployment.network_query.controller_shortnames
end

#param_hashObject



31
32
33
34
# File 'app/models/staypuft/deployment/ceph_service.rb', line 31

def param_hash
  { "fsid" => fsid, "volumes_key" => volumes_key, "images_key" => images_key,
    "osd_pool_size" => osd_pool_size, "osd_journal_size" => osd_journal_size }
end

#set_defaultsObject



15
16
17
18
19
20
21
22
23
24
25
# File 'app/models/staypuft/deployment/ceph_service.rb', line 15

def set_defaults
  self.fsid = SecureRandom.uuid
  key = ` ceph-authtool --gen-print-key`
  key.chomp! if key
  self.volumes_key = key
  key = ` ceph-authtool --gen-print-key`
  key.chomp! if key
  self.images_key = key
  self.osd_pool_size = ''
  self.osd_journal_size = ''
end