class Fog::HP::Network::Port

Public Instance Methods

destroy() click to toggle source
# File lib/fog/hp/models/network/port.rb, line 20
def destroy
  requires :id
  service.delete_port(id)
  true
end
ready?() click to toggle source
# File lib/fog/hp/models/network/port.rb, line 26
def ready?
  self.status == 'ACTIVE'
end
save() click to toggle source
# File lib/fog/hp/models/network/port.rb, line 30
def save
  requires :network_id
  identity ? update : create
end

Private Instance Methods

create() click to toggle source
# File lib/fog/hp/models/network/port.rb, line 37
def create
  requires :network_id
  merge_attributes(service.create_port(network_id, attributes).body['port'])
  true
end
update() click to toggle source
# File lib/fog/hp/models/network/port.rb, line 43
def update
  requires :id, :network_id
  merge_attributes(service.update_port(id, attributes).body['port'])
  true
end