oxidized-script 0.1.1 → 0.1.2
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/CHANGELOG.md +3 -0
- data/bin/oxs +1 -1
- data/lib/oxidized/script/cli.rb +5 -1
- data/lib/oxidized/script/script.rb +5 -4
- data/oxidized-script.gemspec +2 -2
- metadata +5 -5
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: da3237c4e0c473a12f3986aa33b2a346a5aedd50
|
4
|
+
data.tar.gz: 83343c64205b147900da58464d14fb566452ed4b
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: adba2dfd0f966f7183c6a43f08f2d878f9afb882474a8cbe898525d0c02d225333c6967220ba06342fbab92e74ca32cc04db664e1f6540662d3bf1ed1d7ad9a4
|
7
|
+
data.tar.gz: e8e2c3f3f6dc9a455f766bea7051069414271ebc459c6a51c96958ac708dd4f1e02fc4e197f64d6a2b5d3c7897366c8a0d64b75ccf49b34009b59cfd632b290f
|
data/CHANGELOG.md
CHANGED
data/bin/oxs
CHANGED
data/lib/oxidized/script/cli.rb
CHANGED
@@ -1,6 +1,7 @@
|
|
1
1
|
module Oxidized
|
2
2
|
require_relative 'script'
|
3
3
|
require 'slop'
|
4
|
+
|
4
5
|
class Script
|
5
6
|
class CLI
|
6
7
|
attr_accessor :cmd_class
|
@@ -20,7 +21,10 @@ module Oxidized
|
|
20
21
|
|
21
22
|
def initialize
|
22
23
|
@args, @opts = opts_parse load_dynamic
|
23
|
-
|
24
|
+
|
25
|
+
Config.load(@opts)
|
26
|
+
Oxidized.setup_logger
|
27
|
+
|
24
28
|
if @cmd_class
|
25
29
|
@cmd_class.run :args=>@args, :opts=>@opts, :host=>@host, :cmd=>@cmd
|
26
30
|
exit 0
|
@@ -19,7 +19,8 @@ module Oxidized
|
|
19
19
|
def cmd command
|
20
20
|
out = ''
|
21
21
|
out += "## OXS - #{command}\n" if @verbose
|
22
|
-
|
22
|
+
cmd_out = @model.cmd command
|
23
|
+
out += cmd_out if cmd_out
|
23
24
|
out
|
24
25
|
end
|
25
26
|
|
@@ -53,7 +54,7 @@ module Oxidized
|
|
53
54
|
enable = opts.delete :enable
|
54
55
|
community = opts.delete :community
|
55
56
|
@verbose = opts.delete :verbose
|
56
|
-
|
57
|
+
Oxidized.config.input.default = opts.delete :protocols if opts[:protocols]
|
57
58
|
raise InvalidOption, "#{opts} not recognized" unless opts.empty?
|
58
59
|
|
59
60
|
@@oxi ||= false
|
@@ -80,8 +81,8 @@ module Oxidized
|
|
80
81
|
end
|
81
82
|
@node.auth[:username] = username if username
|
82
83
|
@node.auth[:password] = password if password
|
83
|
-
|
84
|
-
|
84
|
+
Oxidized.config.vars.enable = enable if enable
|
85
|
+
Oxidized.config.timeout = timeout if timeout
|
85
86
|
@model = @node.model
|
86
87
|
@input = nil
|
87
88
|
connect
|
data/oxidized-script.gemspec
CHANGED
@@ -1,6 +1,6 @@
|
|
1
1
|
Gem::Specification.new do |s|
|
2
2
|
s.name = 'oxidized-script'
|
3
|
-
s.version = '0.1.
|
3
|
+
s.version = '0.1.2'
|
4
4
|
s.licenses = %w( Apache-2.0 )
|
5
5
|
s.platform = Gem::Platform::RUBY
|
6
6
|
s.authors = [ 'Saku Ytti' ]
|
@@ -13,6 +13,6 @@ Gem::Specification.new do |s|
|
|
13
13
|
s.executables = %w( oxs )
|
14
14
|
s.require_path = 'lib'
|
15
15
|
|
16
|
-
s.add_runtime_dependency 'oxidized', '~> 0.
|
16
|
+
s.add_runtime_dependency 'oxidized', '~> 0.11'
|
17
17
|
s.add_runtime_dependency 'slop', '~> 3.5'
|
18
18
|
end
|
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: oxidized-script
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.1.
|
4
|
+
version: 0.1.2
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Saku Ytti
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date:
|
11
|
+
date: 2016-01-31 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: oxidized
|
@@ -16,14 +16,14 @@ dependencies:
|
|
16
16
|
requirements:
|
17
17
|
- - "~>"
|
18
18
|
- !ruby/object:Gem::Version
|
19
|
-
version: '0.
|
19
|
+
version: '0.11'
|
20
20
|
type: :runtime
|
21
21
|
prerelease: false
|
22
22
|
version_requirements: !ruby/object:Gem::Requirement
|
23
23
|
requirements:
|
24
24
|
- - "~>"
|
25
25
|
- !ruby/object:Gem::Version
|
26
|
-
version: '0.
|
26
|
+
version: '0.11'
|
27
27
|
- !ruby/object:Gem::Dependency
|
28
28
|
name: slop
|
29
29
|
requirement: !ruby/object:Gem::Requirement
|
@@ -80,7 +80,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
|
|
80
80
|
version: '0'
|
81
81
|
requirements: []
|
82
82
|
rubyforge_project: oxidized-script
|
83
|
-
rubygems_version: 2.
|
83
|
+
rubygems_version: 2.4.5.1
|
84
84
|
signing_key:
|
85
85
|
specification_version: 4
|
86
86
|
summary: cli + library for scripting network devices
|