Module: FogExtensions::Openstack::Server

Extended by:
ActiveSupport::Concern
Defined in:
lib/fog_extensions/openstack/server.rb

Instance Method Summary collapse

Instance Method Details

#created_atObject


23
24
25
# File 'lib/fog_extensions/openstack/server.rb', line 23

def created_at
  Time.parse attributes['created']
end

#flavor_with_objectObject


19
20
21
# File 'lib/fog_extensions/openstack/server.rb', line 19

def flavor_with_object
  service.flavors.get attributes[:flavor]['id']
end

#networkObject

dummy place holder for passing down the floating ip network


35
36
# File 'lib/fog_extensions/openstack/server.rb', line 35

def network
end

#resetObject


38
39
40
# File 'lib/fog_extensions/openstack/server.rb', line 38

def reset
  reboot('HARD')
end

#security_groups_with_no_idObject

the original method requires a server ID, however we want to be able to call this method on new instances too


28
29
30
31
32
# File 'lib/fog_extensions/openstack/server.rb', line 28

def security_groups_with_no_id
  return [] if id.nil?

  security_groups_without_no_id
end

#tenantObject


15
16
17
# File 'lib/fog_extensions/openstack/server.rb', line 15

def tenant
  service.tenants.detect{|t| t.id == tenant_id }
end

#to_sObject


11
12
13
# File 'lib/fog_extensions/openstack/server.rb', line 11

def to_s
  name
end