summaryrefslogtreecommitdiff
path: root/lib/leap_cli/config
diff options
context:
space:
mode:
authorelijah <elijah@riseup.net>2015-08-07 14:16:33 -0700
committerelijah <elijah@riseup.net>2015-08-07 14:16:33 -0700
commitbeab1f0ac7212d3c7006238fdd108d66b86323bc (patch)
tree91e9e93960534a771fa311e37b660eda6ea980b6 /lib/leap_cli/config
parentbf1365d5148710667c99132da4745d06a89f6026 (diff)
added `leap compile firewall`
Diffstat (limited to 'lib/leap_cli/config')
-rw-r--r--lib/leap_cli/config/manager.rb22
1 files changed, 22 insertions, 0 deletions
diff --git a/lib/leap_cli/config/manager.rb b/lib/leap_cli/config/manager.rb
index b8343fe..cd4a3d6 100644
--- a/lib/leap_cli/config/manager.rb
+++ b/lib/leap_cli/config/manager.rb
@@ -291,6 +291,28 @@ module LeapCli
@nodes[node.name] = apply_inheritance!(node)
end
+ ##
+ ## CONNECTIONS
+ ##
+
+ class ConnectionList < Array
+ def add(data={})
+ self << {
+ "from" => data[:from],
+ "to" => data[:to],
+ "port" => data[:port]
+ }
+ end
+ end
+
+ def connections
+ @connections ||= ConnectionList.new
+ end
+
+ ##
+ ## PARTIALS
+ ##
+
#
# returns all the partial data for the specified partial path.
# partial path is always relative to provider root, but there must be multiple files