novafizz 0.0.8 → 0.0.9
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- data/bin/nw +18 -18
- data/lib/novawhiz.rb +1 -1
- metadata +1 -2
data/bin/nw
CHANGED
@@ -1,22 +1,22 @@
|
|
1
1
|
#!/usr/bin/env ruby
|
2
|
-
require 'main'
|
3
|
-
require 'novawhiz'
|
4
|
-
|
5
|
-
Main do
|
6
|
-
|
7
|
-
|
8
|
-
|
9
|
-
|
10
|
-
|
11
|
-
|
12
|
-
|
13
|
-
|
14
|
-
|
15
|
-
|
16
|
-
|
17
|
-
|
18
|
-
|
19
|
-
|
2
|
+
require 'main'
|
3
|
+
require 'novawhiz'
|
4
|
+
|
5
|
+
Main do
|
6
|
+
|
7
|
+
def creds
|
8
|
+
{
|
9
|
+
# for use with openstack
|
10
|
+
:username => ENV['OS_USERNAME'],
|
11
|
+
:password => ENV['OS_PASSWORD'],
|
12
|
+
:authtenant => ENV['OS_TENANT_NAME'],
|
13
|
+
:auth_url => ENV['OS_AUTH_URL'],
|
14
|
+
:region => ENV['OS_REGION_NAME'],
|
15
|
+
|
16
|
+
## for use with hpfog
|
17
|
+
#:provider => ENV['PROVIDER'],
|
18
|
+
#:hp_account_id => ENV['HP_ACCOUNT_ID'],
|
19
|
+
#:hp_secret_key => ENV['HP_SECRET_KEY'],
|
20
20
|
#:hp_auth_uri => ENV['HP_AUTH_URI'],
|
21
21
|
#:hp_tenant_id => ENV['HP_TENANT_ID'],
|
22
22
|
#:hp_avl_zone => ENV['HP_AVL_ZONE']
|
data/lib/novawhiz.rb
CHANGED
@@ -184,7 +184,7 @@ class NovaWhiz
|
|
184
184
|
|
185
185
|
def run_command(creds, cmd)
|
186
186
|
res = Net::SSH::Simple.sync do
|
187
|
-
ssh(creds[:ip], '/bin/
|
187
|
+
ssh(creds[:ip], '/bin/bash', :user => creds[:user], :key_data => [creds[:key]], :timeout => 3600, :global_known_hosts_file => ['/dev/null'], :user_known_hosts_file => ['/dev/null']) do |e,c,d|
|
188
188
|
case e
|
189
189
|
when :start
|
190
190
|
c.send_data "#{cmd}\n"
|
metadata
CHANGED