aboutsummaryrefslogtreecommitdiff
path: root/lib/leap_cli/path.rb
diff options
context:
space:
mode:
authorelijah <elijah@riseup.net>2012-12-08 20:02:27 -0800
committerelijah <elijah@riseup.net>2012-12-08 20:02:27 -0800
commit8572dfd59c21d2032b030adc9dc9a973c6e1c3f5 (patch)
tree3d3fb221339ddf4fa0037cbd88133431307f2e4e /lib/leap_cli/path.rb
parent155d744f6c6f94709925f0674f510b3064b6608e (diff)
downloadleap_cli-8572dfd59c21d2032b030adc9dc9a973c6e1c3f5.tar.gz
leap_cli-8572dfd59c21d2032b030adc9dc9a973c6e1c3f5.tar.bz2
added commands 'node add' 'node rm' and 'node mv'
Diffstat (limited to 'lib/leap_cli/path.rb')
-rw-r--r--lib/leap_cli/path.rb25
1 files changed, 16 insertions, 9 deletions
diff --git a/lib/leap_cli/path.rb b/lib/leap_cli/path.rb
index 20994f4..43f2edc 100644
--- a/lib/leap_cli/path.rb
+++ b/lib/leap_cli/path.rb
@@ -2,6 +2,9 @@ require 'fileutils'
module LeapCli; module Path
+ #
+ # all the named paths, relative to provider directory.
+ #
NAMED_PATHS = {
# directories
:hiera_dir => 'hiera',
@@ -23,16 +26,9 @@ module LeapCli; module Path
:provider_json_template => 'files/service-definitions/provider.json.erb',
:eip_service_json_template => 'files/service-definitions/eip-service.json.erb',
- # input data files
- :commercial_cert => 'files/cert/#{arg}.crt',
- :commercial_key => 'files/cert/#{arg}.key',
- :commercial_csr => 'files/cert/#{arg}.csr',
-
# output files
:user_ssh => 'users/#{arg}/#{arg}_ssh.pub',
:user_pgp => 'users/#{arg}/#{arg}_pgp.pub',
- :hiera => 'hiera/#{arg}.yaml',
- :node_ssh_pub_key => 'files/nodes/#{arg}/#{arg}_ssh.pub',
:known_hosts => 'files/ssh/known_hosts',
:authorized_keys => 'files/ssh/authorized_keys',
:ca_key => 'files/ca/ca.key',
@@ -42,10 +38,14 @@ module LeapCli; module Path
:commercial_csr => 'files/cert/#{arg}.csr',
:commercial_cert => 'files/cert/#{arg}.crt',
:commercial_ca_cert => 'files/cert/commercial_ca.crt',
- :node_x509_key => 'files/nodes/#{arg}/#{arg}.key',
- :node_x509_cert => 'files/nodes/#{arg}/#{arg}.crt',
:vagrantfile => 'test/Vagrantfile',
+ # node output files
+ :hiera => 'hiera/#{arg}.yaml',
+ :node_ssh_pub_key => 'files/nodes/#{arg}/#{arg}_ssh.pub',
+ :node_x509_key => 'files/nodes/#{arg}/#{arg}.key',
+ :node_x509_cert => 'files/nodes/#{arg}/#{arg}.crt',
+
# testing files
:test_client_key => 'test/cert/client.key',
:test_client_cert => 'test/cert/client.crt',
@@ -53,6 +53,13 @@ module LeapCli; module Path
:test_client_openvpn_template => 'test/openvpn/client.ovpn.erb'
}
+ #
+ # paths that take node name as the argument
+ #
+ NODE_PATHS = [
+ :node_config, :hiera, :node_x509_cert, :node_x509_key, :node_ssh_pub_key
+ ]
+
def self.platform
@platform
end