Class: Fog::HP::Network::Port

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

Instance Method Summary collapse

Instance Method Details

#destroyObject



20
21
22
23
24
# File 'lib/fog/hp/models/network/port.rb', line 20

def destroy
  requires :id
  service.delete_port(id)
  true
end

#ready?Boolean

Returns:

  • (Boolean)


26
27
28
# File 'lib/fog/hp/models/network/port.rb', line 26

def ready?
  self.status == 'ACTIVE'
end

#saveObject



30
31
32
33
# File 'lib/fog/hp/models/network/port.rb', line 30

def save
  requires :network_id
  identity ? update : create
end