Class: Tiktalik::Computing::Network

Inherits:
Object
  • Object
show all
Defined in:
lib/tiktalik/computing/network.rb

Instance Attribute Summary collapse

Class Method Summary collapse

Methods inherited from Object

#initialize

Constructor Details

This class inherits a constructor from Tiktalik::Object

Instance Attribute Details

#domainnameObject (readonly)

String



8
9
10
# File 'lib/tiktalik/computing/network.rb', line 8

def domainname
  @domainname
end

#nameObject (readonly)

String



8
9
10
# File 'lib/tiktalik/computing/network.rb', line 8

def name
  @name
end

#netObject (readonly)

String



8
9
10
# File 'lib/tiktalik/computing/network.rb', line 8

def net
  @net
end

#ownerObject (readonly)

String



8
9
10
# File 'lib/tiktalik/computing/network.rb', line 8

def owner
  @owner
end

#publicObject (readonly)

String



8
9
10
# File 'lib/tiktalik/computing/network.rb', line 8

def public
  @public
end

#uuidObject (readonly)

String



8
9
10
# File 'lib/tiktalik/computing/network.rb', line 8

def uuid
  @uuid
end

Class Method Details

.allObject

List of available networks.



16
17
18
19
# File 'lib/tiktalik/computing/network.rb', line 16

def self.all
  results = request(:get, '/computing/network')
  results.collect { |result| new(result) }
end

.create(params = {}) ⇒ Object

Create private network.

Parameters:

  • params (Hash) (defaults to: {})

    Params for network

Options Hash (params):

  • :name (String)

    Network name - as part of local domain(required)



26
27
28
29
30
# File 'lib/tiktalik/computing/network.rb', line 26

def self.create(params = {})
  require_params(params, :name)
  result = request(:post, '/computing/network', params)
  new(result)
end

.find(uuid) ⇒ Object

Get network.

Parameters:

  • uuid (String)

    UUID of network



35
36
37
38
# File 'lib/tiktalik/computing/network.rb', line 35

def self.find(uuid)
  result = request(:get, "/computing/network/#{uuid}")
  new(result)
end