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



24
25
26
# File 'app/models/staypuft/deployment/ceph_service.rb', line 24

def mon_initial_members
  fqdns = deployment.network_query.controller_fqdns.map {|fqdn| fqdn.split(".").first}
end

#param_hashObject



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

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

#set_defaultsObject



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

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
end