Class: Fog::Network::Softlayer::Datacenter

Inherits:
Model
  • Object
show all
Defined in:
lib/fog/softlayer/models/network/datacenter.rb

Instance Method Summary collapse

Constructor Details

#initialize(attributes) ⇒ Datacenter

Returns a new instance of Datacenter.



17
18
19
20
# File 'lib/fog/softlayer/models/network/datacenter.rb', line 17

def initialize(attributes)
  @connection = attributes[:connection]
  super
end

Instance Method Details

#createObject



40
41
42
# File 'lib/fog/softlayer/models/network/datacenter.rb', line 40

def create
  raise "Not possible."
end

#destroyObject



48
49
50
# File 'lib/fog/softlayer/models/network/datacenter.rb', line 48

def destroy
  raise "Not possible."
end

#get_avaliable_maintenance_windows(begin_date, end_date, slots_number) ⇒ Object



32
33
34
# File 'lib/fog/softlayer/models/network/datacenter.rb', line 32

def get_avaliable_maintenance_windows(begin_date, end_date, slots_number)
  service.get_maintenance_windows(id, begin_date, end_date, slots_number).body
end

#routable_subnetsObject



27
28
29
30
# File 'lib/fog/softlayer/models/network/datacenter.rb', line 27

def routable_subnets
  requires :id
  @routable_subnets ||= service.request(:location_datacenter, "#{id}/get_bound_subnets").body
end

#routersObject



22
23
24
25
# File 'lib/fog/softlayer/models/network/datacenter.rb', line 22

def routers
  requires :id
  @routers ||= service.get_datacenter_routers(id).body
end

#saveObject



36
37
38
# File 'lib/fog/softlayer/models/network/datacenter.rb', line 36

def save
  raise "Not possible."
end

#updateObject



44
45
46
# File 'lib/fog/softlayer/models/network/datacenter.rb', line 44

def update
  raise "Not possible."
end