Revision b64117f6
Added by Dominic Cleal almost 10 years ago
app/models/host/managed.rb | ||
---|---|---|
end
|
||
|
||
def clone
|
||
# .dup uses deep_cloneable gem
|
||
# do not copy system specific attributes
|
||
host = self.dup(:include => [:host_config_groups, :host_classes, :host_parameters],
|
||
:except => [:name, :mac, :ip, :uuid, :certname, :last_report])
|
||
host = self.deep_clone(:include => [:host_config_groups, :host_classes, :host_parameters],
|
||
:except => [:name, :mac, :ip, :uuid, :certname, :last_report])
|
||
if self.compute_resource
|
||
host.compute_attributes = host.compute_resource.vm_compute_attributes_for(self.uuid)
|
||
end
|
Also available in: Unified diff
fixes #6410 - update to deep_cloneable 2.0