Class: Fog::Network::SakuraCloud::Switch

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

Instance Method Summary collapse

Instance Method Details

#deleteObject Also known as: destroy



18
19
20
21
# File 'lib/fog/sakuracloud/models/network/switch.rb', line 18

def delete
  service.delete_switch(identity)
  true
end

#saveObject



24
25
26
27
28
29
30
# File 'lib/fog/sakuracloud/models/network/switch.rb', line 24

def save
  requires :name
  Fog::Logger.warning("Create Switch")
  data = service.create_switch(@attributes).body["Switch"]
  merge_attributes(data)
  true
end