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.



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

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

Instance Method Details

#createObject



38
39
40
# File 'lib/fog/softlayer/models/network/datacenter.rb', line 38

def create
  raise "Not possible."
end

#destroyObject



46
47
48
# File 'lib/fog/softlayer/models/network/datacenter.rb', line 46

def destroy
  raise "Not possible."
end

#routable_subnetsObject



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

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

#routersObject



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

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

#saveObject



34
35
36
# File 'lib/fog/softlayer/models/network/datacenter.rb', line 34

def save
  raise "Not possible."
end

#updateObject



42
43
44
# File 'lib/fog/softlayer/models/network/datacenter.rb', line 42

def update
  raise "Not possible."
end