sapoku 0.0.5 → 0.0.6
Sign up to get free protection for your applications and to get access to all the features.
- data/lib/sapoku.rb +11 -1
- metadata +1 -1
data/lib/sapoku.rb
CHANGED
@@ -18,12 +18,22 @@ class Tadpole
|
|
18
18
|
return tadpole
|
19
19
|
end
|
20
20
|
|
21
|
+
# returns an array of known Tadpoles - doesn't scale, obviously
|
22
|
+
def self.all
|
23
|
+
tadpoles = `lxc-ls -1`.split(/\n/).uniq
|
24
|
+
output = []
|
25
|
+
for t in tadpoles do
|
26
|
+
output << self.find(t)
|
27
|
+
end
|
28
|
+
return output
|
29
|
+
end
|
30
|
+
|
21
31
|
# create a new container stub (then requires saving)
|
22
32
|
def initialize(name)
|
23
33
|
@container_ip = getfreeip
|
24
34
|
@local_port = getlocalport
|
25
35
|
@app_name = name
|
26
|
-
@ram =
|
36
|
+
@ram = 512
|
27
37
|
end
|
28
38
|
|
29
39
|
# creates and saves the new container
|