Class: Tiktalik::Computing::Network
- Defined in:
- lib/tiktalik/computing/network.rb
Instance Attribute Summary collapse
-
#domainname ⇒ Object
readonly
String.
-
#name ⇒ Object
readonly
String.
-
#net ⇒ Object
readonly
String.
-
#owner ⇒ Object
readonly
String.
-
#public ⇒ Object
readonly
String.
-
#uuid ⇒ Object
readonly
String.
Class Method Summary collapse
-
.all ⇒ Object
List of available networks.
-
.create(params = {}) ⇒ Object
Create private network.
-
.find(uuid) ⇒ Object
Get network.
Methods inherited from Object
Constructor Details
This class inherits a constructor from Tiktalik::Object
Instance Attribute Details
#domainname ⇒ Object (readonly)
String
8 9 10 |
# File 'lib/tiktalik/computing/network.rb', line 8 def domainname @domainname end |
#name ⇒ Object (readonly)
String
8 9 10 |
# File 'lib/tiktalik/computing/network.rb', line 8 def name @name end |
#net ⇒ Object (readonly)
String
8 9 10 |
# File 'lib/tiktalik/computing/network.rb', line 8 def net @net end |
#owner ⇒ Object (readonly)
String
8 9 10 |
# File 'lib/tiktalik/computing/network.rb', line 8 def owner @owner end |
#public ⇒ Object (readonly)
String
8 9 10 |
# File 'lib/tiktalik/computing/network.rb', line 8 def public @public end |
#uuid ⇒ Object (readonly)
String
8 9 10 |
# File 'lib/tiktalik/computing/network.rb', line 8 def uuid @uuid end |
Class Method Details
.all ⇒ Object
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.
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.
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 |